I initially had an idea of writing a bridge from DMX to talk to the Yongnuo YN360 or YN360-II wand-lights, but for a few reasons I found that this would not work well, primarily due to the high latency in the connection.
Instead, I’m publishing my code for talking to the YN360 using the BLE Nano from RedBear labs, which is based on the Nordic nRF51822. I spent quite a few nights wrestling with the code, partially due to my rusty C skills, but I got there in the end.
My experience working with the RedBear was mostly positive. It was quite a struggle to talk to the device using a Mac, I had to resort to terminal commands and AppleScript hack applications, which is really disappointing considering the easy of use that the mbed platform is trying to offer – its not at the stage where I can really recommend it for novices yet, which is a real shame as it is so so close!
More frustratingly, while there are a few examples provided in the library of how to program the BLE Nano in peripheral role mode, there is very little provided about how to use central role mode.
I do need to acknowledge that the support staff on the RedBear forum were helpful, but I think that as english was not their first language, communication was a little more difficult than it could have been.
The code at my github links below will search your local area for a BLE YN360, and then will connect to it, and cycle through a few different modes.
Github: YN360 arduino code for BLE Nano
Feel free to leave comments below if you have any questions about my code.
You can buy the compatible light wands here: YN360 or YN360-II.
Mis
Great work – used once your code for connecting to yn360 from Linux and dongle. Will that arduino alternative work with esp8266? I am trying to locate missing library BLE_API.h but I am a total noob. Thank you
admin
Their site is offline, but the setup instructions for the BLE_Nano are at github:
https://github.com/redbear/nRF5x/blob/master/nRF52832/docs/Arduino_Board_Package_Installation_Guide.md
If you want to dig through and have a peek, here is the entire RedBear library package from arduino — BLE_API.h is in there: https://www.dropbox.com/s/id65mbk0r8lsay1/RedBear.zip?dl=0
The ESP8266 doesn’t have bluetooth? Only the ESP32 does. I have not played with either yet.. still on my backlog of projects to try 😛
Mis
Thank you 🙂 Yes, I meant ESP32, waiting for delivery 🙂 Hope it will work, this way I could control both YN360 and another LED strip
admin
I’m sure there’ll be some good example libraries for you to play around with for the ESP32. Bluetooth LE is not too hard to get familiar with, and I think this is a great project to start with, at least it was for me!