I recently tried my hand at writing/porting a library to interact with the Philips Hue bridge and connected lights. The library is posted here - https://github.com/nolandubeau/philips-hue
I have studied several example libraries and read through the Particle library docs. There are so many great examples out there to learn from.
When I include this library in a project and flash it to an argon for example, it compiles and flashes the first time without error, however the application doesn’t appear to work as there is no output in the serial monitor. When I then try to flash it again, there is a DFU error in the workbench terminal and the board goes into an unresponsive state from therein. In order to get the board working I then need to re-flash the firmware to get it to respond.
As I’m new to developing on the Particle platform I’m at a loss as to why the board becomes unresponsive with the DFU error. The code appears to “blow it up”, but at the same time it compiles without error.
Note: With the exception of one function in the firmware, I have commented out the majority of REST calls and just returned strings for testing purposes. Also, you will need to provide the IP to your PhilipsHue hub as well as the API user which you can generate with a rest call to the hub.
Hoping someone more experienced on the list can shed some light (pun intended) to help me get past the error.