I have been working on some more educational R&D for the last week or so - exploring the possibilities with Bluetooth, specifically BLE.
The application involves four battery operated devices that need to link together.
- A helmet, with a servo to power a visor up and down, and LEDs for the eyes.
- A left glove with a disc of LEDs in the palm (I believe called a "repulser").
- A right glove, the same.
- A suit with speakers and a large ring of bright LEDs (I believe called an "arc reactor").
Why linked together?
Each works independently, and each has a button to trigger working. The repulser will quickly fade up to a bright light then go off. The helmet goes up or down.
The ideas is that when you activate the repulser, a synchronised sound effect of an increasing sound and a whoosh and crash happens at the same time. Similarly when the visor closes there is a synchronised clunk as it finished closing. A few other synchronised novelty effects have been added as well.
How to link them together?
The obvious, and low power, way to link would be cables, plugs and sockets. But this would be hugely inconvenient for the weather.
So - Bluetooth, specifically low energy BLE.
Daunting task
This was indeed a daunting task. I have done a little with BLE, just passively scanning advertisements to pick up and decode advertisements from temperature sensors. This would need a lot more.
But I went for it, and, well, it took a day!
Basic example code
I used the basic security gatt example - and to my amazement it worked. Minor bug and slight tweak, but very quickly I had a "heart rate monitor" server, and there clients connected. I then succeeded in having clients change the heart rate monitor location (text) which I used to tell the suit what sound to play.
Moving on
I tried to adjust the GATT fields, and failed. I need to read up more and understand how to do this, and add device information perhaps. Then consider making custom service codes - after all, calling an arc reactor a "heart monitor" is perhaps a stretch.
I need to properly understand the example code in the process, and prune it down.
I've also applied for a Bluetooth manufacturer code.
No comments:
Post a Comment
Comments are moderated purely to filter out obvious spam, but it means they may not show immediately.