OctoWS2811 Teensy 3.0 and Bluetooth

I have been working on using bluetooth to control scrolling text. I made a top hat that has scrolling text, but so far this has been pre loaded text triggered by a button.

Using the btinterface app for android (I have no connection with this app), I can now control the text being displayed on the hat via a terminal on the android phone.

You can get the free app at the google play store, and there is a good forum for discussing any issues and getting support.


But, I guess that you can use any bluetooth terminal app. I chose this one as it also has an extra screen that has a set of button and a slider that you can configure in the arduino sketch. This way I can have a set of presets that are triggered, as well as going into the terminal and sending text to be diplayed. I use the presets to show various patterns on the hat.

The app works by sending a specified set of characters when a particular button is pressed, or when a specified set of characters are typed into the terminal of the app. The characters are sent to the arduino (Teensy in this instance) via the bluetooth module as a serial message, and the arduino sketch looks for these given characters and determines if they are a command. For example, if button one is pressed, “B1” is sent over serial and arduino code says that if B1 is received, go an do something.

The code below uses the Scrolling text code on the previous page. There need to be a couple of changes to initialise an array:
char charBuf[20];
and to start a Serial port. The line:
Serial1.begin(9600); needs to be added into the setup method.

and I have changed the name of the method from text test to textscroll to identify the change.

What we do here, is to use the hardware serial available in Teensy 3.0 to talk to the bluetooth module. We start the serial port in setup, and it then listens to the Tx Rx pins for serial 1 (which for this hardware serial are pins zero and one).

The bluetooth module is JY-MCU 07 bought one for less than £10.
JY-MCU07 bluetooth module
JY-MCU07 bluetooth module