1. Set up the code for the IR sensor. To do this, you must declare integer for the IR proximity, distance variable and transition time, and digital pin for the ir sensor pin.
2. Set up the code for the neopixel. To do this, you must define pixel pin, count and type, and include neopixel library.
3. Initialize all pixels to 'off'.
4. Write an if loop in order to lit the candle according to the distance variable.
5. Complete the setup for the neopixel and functions that you will call later.
6. Connect the two photons and publish events by referring to the template code provided
Is this a good/useful/informative piece of content to include in the project? Have your say!
You must login before you can post a comment. .