This is the seventh in a series of blog posts about researching and rewiring Christmas lights to work with Arduino devices.
I have been thinking a lot about how to best remotely control the Arduino connected to the G-35 lights string.
I could use a WiFi module and have it act as a TCP server where I could send light control commands. While I have an ESP8266 module, I don’t have a level shifter to properly connect it to the Arduino. Yes, I could program the ESP8266 directly and skip the Arduino but I would still need a level shifter and I don’t have the components to get this working this year. There would also be application programming to control it remotely.
I could use a Bluetooth module (SHD_BLE4_Pro) and have it listen for commands from either a mobile or Raspberry Pi. The module I have is a shield that is BLE 4.0 and supports iBeacon, so I have the components. I would need to write a custom app for the Raspberry Pi to provide a web interface, and find or write an iOS app to control it from the phone.
The last option is to use the 433MHz radio modules to send commands from the Raspberry Pi to the Arduino. The range would be good, but doesn’t matter as both devices will be in the same home. I have the components, which is an upside. I would need to write a custom app on the Pi for the interface, and I wouldn’t be able to control it with a mobile device directly (aside from the web interface). I would also need the Pi whenever I wanted to change the program.
Of these the second option looks to be the best as I could set the lights up at the office and still control them with my iPhone. It would also give me an opportunity to try iBeacons and iPhone BLE development.
I won’t have any code or examples in this post, instead I wanted to explain my reasoning for the next post. I also need to do the work!
- Get the Raspberry Pi to send messages (commands) to the Arduino over Bluetooth
- Get an iPhone 6S to send messages to the Arduino over Bluetooth
- Write an Arduino program that can receive custom programs from the Pi or iPhone, or run default programs
- Update the iOS app to allow sending custom programs or selecting default programs, then test with the lights
- Update the Pi app to do the same and provide a small web app interface
- Optional: Add on/off and program switch buttons to the Arduino directly
The iOS app will probably not be published on the App Store as I don’t want to buy a developer account. I should be able to publish the code though.
Regarding the Home Collection lights: the next post will be about controlling them on the Pi with a web interface, as well as setting up Cron to turn the lights off at midnight.