Back to Parent

Challenges & Mitigations

During the course of building this prototype we encountered some challenges, which are detailed below:

1. Neopixel setup

One confusing part of using Neopixel is the voltage. It says on the back of Neopixel, 5v is the required voltage, however, seems like photon only support 3v. Don' t let it hold you back, if the neopixel is less than 25 pixels and no other major components, you can power from the Vin and not 3v3 otherwise your Photon might brown out. If there are more than 25 pixels, unfortunately, you do need to add extra power, for instance, a 5v battery. Additionally, you need to be cautious when setting up the circuit. It is necessary to solider jumper wires to neopixel to ensure the connection with photon.

2. Neopixel code

Neopixel code is often challenging to write. But it isn't as intimidating as it seems to be. Once you understand the basic of it, it becomes easy since sample code is easy to assess online. Here are basics you need to know. 

a) Add the library by #include <neopixel.h> before everything else. You may add #include <math.h> to  achieve more sophisticate effects involving math functions. 

b) To kick off neopixel project, you should include following three lines of code in setup (): strip.setBrightness ( xx); strip.begin(); strip.show(); SetBrightness allows you to adjust  neopixel to the comfort brightness. Strip.begin() and show() is the commend to jump start the neopixel. Especially command show() is to light up the neopixel to the way you want. 

c) There are various of effect neopixel can display and for loop is commonly used.  One important trick in the for loop is strip.numpixel(), which used to determine number of the total pixel. It becomes handy when programming any effects of neopixel. 


Content Rating

Is this a good/useful/informative piece of content to include in the project? Have your say!

0