Particle Photon/Spark Core RGB WS2812B

Sure I can try to help.

I only know particle IDE so I can’t comment on ATOM, but I know it is an interactive IDE that the Particle team has been working on and I have to say I am interested in using.

The following are the steps that should get you to functioning:

  1. Copy the Photon RGB Template firmware from github and go to the Particle IDE.

  2. On the code page on particle ide create a new app. Paste the copied code from github.

  3. Go back to github and grab Photon neopixel.cpp and Photon neopixel.h. You will need to create these files as well on Particle ide you do so by pressing the + sign in the upper right corner. As a side note when you press the + sign it will create both a .cpp and .h file and you will just need to paste the code into these and rename them to neopixel.cpp and neopixel.h as they are named in the .ino file (the main file).

  4. You need to make one change to the main firmware code and that is to define the number of pixels you have. On line 15 you will see:
    define PIXEL_COUNT 88
    Change this to however many pixels you have in your strip… as a side note there is some electrical equation you need to understand in terms of the number of pixels you have if you are running off of vin. I would not recommend much more than 120 pixels as you will be well over the electrical capacity of the photon for output. This shouldn’t hurt the Photon if you go over as there is a regulator on vin, but you may get a voltage drop.

  5. The next step will be to create a smartthings DHT (device handler). To do this you will need to go into Smartthings IDE. Copy the Photon RGB Smartthings Device Type from github and after you are done with that save and publish for me on the Smartthings IDE.

  6. This is where most people get a little lost. The next step requires you to create a new device on the Smartthigns IDE. So if you go to the devices tab click on the new device tab on the upper right.

  7. After you have created the new device you will need to log into the mobile app. You should have a device that needs to be configured. You are getting close if you have this so you should feel good.

  8. In the device in the mobile app you will need to go into the settings menu for the device (the gear). Here you will need to enter two things. The first is the Access Token. The Access Token is unique to you but not to the device. What I mean by this is that if you 12 Photon devices (like me) this Access Token will be the same for all of them. You will find this access token on the settings page on the Particle IDE. Settings is the gear on the left side of the Particle IDE.

  9. The final piece of this fairly intricate puzzle is the device id. You will need to put the device id on the mobile app device settings page. To find you will go to the Particle ID again, but this time you go to the devices page (looks like a target on the left side). Next to each device there is a right arrow. If you hit that right arrow the device id will show up. Copy this and place it in the mobile app for the device.

  10. Enjoy

Looking back on these instructions I am quite impressed that I managed to get all of this running let alone the json returns and everything else involved, and funny enough I didn’t think this was overly complex.

I am usually fairly responsive to threads so let me know if you have any questions. I don’t know if the RGB selector is working perfect, but everything else should work(on/off/tv dim/movie dim/red(I use this code in a home theater). I need to spend some time on the RGB selector, but I have been pretty busy and well life.

2 Likes