Read this at the risk of spoiling everything. I would avoid it if you can.
Last night I figured out my code. Right not it is set up to run two actions on a single strand of LEDs. Seven LEDs will be designated as display lights for Morse Code which will display a phrase and repeat after the cycle. The rest of the LEDs are coded to be on at a constant brightness. I'll tell you what they will all be used for later but at this point they work correctly.
This code took about 20 hours to sort out and involved information gathered and learned from more then 15 other finished codes found all over the internet. While each of the codes I found taught me something that pushed me towards my final product, three of them were major pieces to the puzzle as I plugged and played through all of them. I'm way closer to Arduino literacy then I was with the code for Zed and with help from the many sources I can write commands from scratch. This allowed me to turn what was originally a much longer script of parts into a nice tight set of commands where instead of having three sepperate sections refer to three sepperate LED actions, I now have one driving it all three.
Here of a video of the lights in action.
The Guts!
// Think about the space between the repeat. Longer or not?
// There is a dimming of the pixels that are not involved in the Morse when pulse occurs. Hoping external power supply fixes issue.
// Think about leaving some light in the low end of the pulse and pauses.
#include <Adafruit_NeoPixel.h>
#define PIN 6
#define NUM_LEDS 8
// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
Reader Comments