Home Creators Posts Import Register Favorites Logout

Content

One of my lovely patreons recently asked if I could do an video illustrating how to create a Bluetooth connection to Arduino. There's already quite a few examples on the internet that illustrate a basic setup for the popular (and cheap!) HC-05 Bluetooth module, which is available for just $3 from  https://www.banggood.com/custlink/DvmGNF87NU  (I have no idea how anyone can manufacture something and post it from the other side of the world to me for less than the cup of coffee in Starbucks!), so I wanted to try to think up a slightly different angle...

Then, I came across the Blue Display library, which you can find at  https://github.com/ArminJo/android-blue-display/blob/master/README.md , which I found really intriguing. It's a library of two halves - an Android app that runs on your phone, and an Arduino sketch, which talk to each other via Bluetooth. What's unique is that the user interface displayed on the phone is actually defined in the Arduino sketch, and sent via Bluetooth when the device first connects. I thought this was a great way to illustrate how the HC-05 transceiver module can both send and receive data over bluetooth, so here it is! Note the section of the video about wiring - although the HC-05 can be powered at 5V, the logic level of the data lines is only 3.3V, so you shouldn't connect it directly to the Arduino GPIO pins - instead, you can create a simple voltage divider circuit using one 1kΩ  resistor, and one 2kΩ  resistor. (Note that it's fine to connect the Tx output from the HC-05 directly to the Arduino).

If you have any questions about how it works, or can think of an example of how you might want to see Bluetooth technology used in a future escape room puzzle, please let me know!

Files

Bluetooth HC-05 Blue Display Android to Arduino Controller

In this video, I'll describe the "Blue Display" Arduino library, which allows you to use an Android device to remote control an Arduino sketch via Bluetooth. What's unusual about this library compared to other similar Arduino Bluetooth code examples is that not only does the Blue Display library define the behaviour of how the Arduino responds to Bluetooth messages, but it also defines the GUI user interface which is displayed on the client device (i.e. a mobile phone), which itself is sent via Bluetooth on connection... pretty neat! You can find the Blue Display library at https://github.com/ArminJo/android-blue-display/blob/master/README.md I'm using an HC-05 Bluetooth module, which you can get for just $3 from https://www.banggood.com/custlink/DvmGNF87NU Part of my Tech Advent Calender for 2019! For my projects, see https://www.patreon.com/playfultech

Comments

Michael

Also really cool. What code are you using for the Phone?

Michael

Thx. And merry xmas