Bluetooth + WS2812 LED's
Hello,
I need to control a few feet of WS2812 LED's via phone app and am assuming BlueTooth is the best way to go about it.
This will be my first time programming a propeller for bluetooth, and I'm hoping theres already an app available for iPhone/Android.
The $50 modules are a bit much, but I found HC-05 and HC-06 on ebay quite inexpensive.
Which BT module should I go with... HC-05 or HC-06
What is the difference between them?
Will any of these OBEX modules work directly with them or will I need to write one from scratch?
Thanks!
I need to control a few feet of WS2812 LED's via phone app and am assuming BlueTooth is the best way to go about it.
This will be my first time programming a propeller for bluetooth, and I'm hoping theres already an app available for iPhone/Android.
The $50 modules are a bit much, but I found HC-05 and HC-06 on ebay quite inexpensive.
Which BT module should I go with... HC-05 or HC-06
What is the difference between them?
Will any of these OBEX modules work directly with them or will I need to write one from scratch?
Thanks!
Comments
-- http://www.efx-tek.com/php/smf/index.php?topic=2352.0
I wrote a little Android app using App Inventor (blocks style programming) but any Bluetooth terminal will do. The HC-8+ is a P1-based prop controller (I designed it for EFX-TEK, and like to use it in client projects).
Assuming slave is ok?... Such as this one
As long as it has 3.3v IO, that board should be fine.
Does a master module only send & slave only receive? or do they both have 2-way?
Its a waterproof outdoor sign, cnc machined and the led's light it up at night.
The configuration method for this project will be:
Phone app sets what color & brightness or auto color change mode
Phone app can set on/off time schedule or light sensor mode
And basic on/off
So I dont absolutely need bi-directional comm, but it would be nice to have the sign show on the phone app what mode its in and what time schedules are set.
Does that mean I can use any of the HC-06 bluetooth modules? mast/slave/both?
I also modified one of these apps for a tablet so that I could control the color and size of characters and backgrounds etc via Bluetooth. This was especially important since it needed to monitor and provide operator controls for 1.5MVA "regulator".
SInce I use a 4x2 connector or a 5x1 in place of the 4x1 Prop plug connection, I also have +5V available on the header so it is an easy thing to plug a Bluetooth module in on the serial port of my board.
BTW, Tachyon has an on-chip OBEX practically and also includes WS2812 drivers and high-level operations..
I enjoy learning new things like this, but im so new that I am wary of wasting money on the wrong products and a week or two in shipping and fruitless experimenting.
since bluetooth is brand new to me, understanding the basics gives a great jump over trial and error... things that are so basic that you probably assume I already know.
for example I wasnt sure if a slave module is full duplex or if I need a master + slave module for that... and I'm not sure what you mean by a 'VT Module'... I assume that was a simple typo and meant to be 'BT Module'?
I've already completed the WS2812 programming, scheduling and so forth on the prop.
Understanding which bluetooth module to buy and programming basics helps incredibly.
I appreciate your time helping me get started!
Should I search app store for bluetooth serial, or is there one you can recommend already suited for WS2812?
The point is, you can do this -- and it should be fun.
Yes, the point is to just do it. That means that while you might ask a question or two, you really need to take some initial steps yourself and try stuff out. Then you get a better idea about stuff. Just find a Bluetooth terminal app and try it out by opening a terminal on your PC and connecting to it.
"You can do this"
In case you need a bit of 'grounding' in the use of bluetooth with propellar then you might find this instructable- by the much missed 'gadget gangster', useful.
https://www.instructables.com/id/How-to-use-Bluetooth-with-your-Propeller/
Dave
Sorry- no!
Dave
Found this site appypie.com that is supposed to be good for creating apps for both iphone and samsung... havent tried yet though.
Here's the last of the three videos where I show an app to change LED colors (color changing occus at 2:22 in the video).
The app is horibly ackward but maybe it will provide some additional insight to AI2 over what Jon has already provided.
Here's a link to the first video in the series.
I haven't used AI2 for several years. I use Android Studio to write my apps now. It's not nearly as fast or easy as AI2 but the block code style of AI2 becomes unmanagable for all but simple programs.
I've done multiple projects using Bluetooth with the Propeller. I prefer the HC-05 over the HC-06. The HC-05 can be used as a both master and slave. Using HC-05 it's possible have Bluetooth communication between Propellers.
I'm also a fan of the ESP32 modules. These have both Bluetooth and WiFi. You can off load some tasks to the ESP32 if the Propeller is becoming burdened (or running low on RAM). The ESP32 can also provide the Propeller with ADC inputs.
The ESP32 would require a program to pass the Bluetooth data through to the hardwired UART.
For now I want to do just a basic interface such as a PST interface on prop to show received commands from a phone app.
I figure that will be the best way to start since I can simply redirect received commands for other uses in code
I didnt realize that appypie requires $, any advice on even a basic ios interface? Tachyon blows my mind on complexity, but its overkill for my needs.
appearances are not a concern right now, just a simple app I can program a button to relay code or value to the prop would be a great start.
Trying the "jm_hc-06_configurator__17-03-21.spin"... updated tx/rx pins (no resistors between prop and bt module)... It will not connect
The BT module led is blinking red.
Here is the exact module I purchased
any ideas?
Not necessary -- it's a straight-up serial connection. I did create a little program to configure the HC-06 because it doesn't use CR as a line ending, and the time-out is too fast for normal human interaction. I've attached a couple archives for a project that I did back in the days of EFX-TEK where I used the Propeller to control [WS28xx] Christmas lights as in the show "Stranger Things."
I have this in the program: During development the mode is set to M_USB which lets me use PST to send command strings into the program. When I'm happy I switch the mode to M_BLUE which uses the BT module instead.
Those constants are used in the setup() method:
The core of the program is a very simple parser that looks for known words. Anything it doesn't know, e.g., a name, it will spell out by dimming the bulb associated with the letter.
The project.
Make sure that the TX pin defined on the Propeller is connected to the RX pin of the HC-06, and vice versa -- this is a common error. The configurator should poll the module until it finds the baud rate and from there you can change things like its ID and PIN code.