Now that we’ve got most of the hardware components working now, we just needed to finalize and polish the code so the sign is better looking, and that the lights work well so our intention is clear.
lightsworking.mov
The wires are a bit finicky at times. I've been trying a couple of options to debug why the time of flight distance sensor doesn't work from time to time:
- Increase the delay in the while loop to wait for Serial to begin i.e. to delay(100)
- Add an address to lox.begin(0x30)
- Make sure all the wires are snug, the jumper wires that came with our kit are sometimes a bit loose
- Sometimes the distance sensor needs to be triggered with an example code, if my code had a bug in it, it would “crash” it and not run again until I upload a different working code
- Sometimes switching out USB ports help
- David offered this diagram (from this Sparkfun article) as a suggestion to maybe why our sensor is finicky, and to double-check that it is soldered correctly:
Messy alligator clips situation
The soldered ends kept snapping off
Since the pieces are so finicky I've started reading the best practices guides for both the neopixels and sensors, and here's what I've learned:
- Bench power supplies can easily destroy neopixels bc it spikes in voltage on start
- A 300-500 ohm resistor should be added between the microcontroller and neopixels data input
- The white light operates differently from RGB-colored lights, and besides HSV you can also omit the SV numbers for a pure color with just the H
Debugging the NeoPixel:
- it took me some time to wrap my head around the concept of having two loops inside of the code—the loop() function and the for loop—since I was adding a delay to the for loop it was having no effect because the loop() function would just keep running over and over
Because we cut the LED strip in half to align it across the two words, we soldered it back together using wires. However the wires would snap off, so we shortened our wires, and had to cut off one of the LED light to solder onto a newer piece.
Measuring our lights with our laser cut sign before re-soldering
After our in-class review session, I tried to quickly mock-up what our sign could look like with a face of paint, in different colors.