NeoPixel NeoMatrix 8X8 Sine Wave and Sawtooth Wave Sketches
Based on code by @Sean_Clohesy , I was able to create sine wave and sawtooth wave functions for the NeoPixel NeoMatrix 8X8. I was able to use a number of the different ways to change color of the wave pixels including the palette crossfade code and other methods created by @Mark_Kriegsman .
How do you show all these methods? Use Mark’s Timecode Performance code.
The lower left hand pixel of the matrix is pixel 0. I have both the sine waves and the sawtooth waves going from bottom to top and from left to right.
Here is the sine wave video:
Here is the sawtooth wave video:
The sketches for these videos are located in GitHub at:
These sketches were run on the NeoPixel NeoMatrix 8X8 using the FastLED 3.1.1 library and the Arduino IDE 1.6.8. They ran successfully on an Arduino Uno, a DFRobot Beetle, an Adafruit Metro Mini and a Teensy 3.1 with level shifter. Between the MCU and the matrix, I use the two resistor fix protection circuit (see: Adafruit customer service forums • View topic - First LED frequently burning out on NeoPixels and look for - ws2812.jpeg) between the MCU data out pin and the matrix data in connection.
Each wave function uses the fadeToBlackBy function. If you change the “fade by” number 150 to a lower value like 20 to 40 then each “dot” in the wave will have a tail.
Thanks to the FastLED community who have provided a wealth of information that has allowed me to have lots of fun with RGB LEDs.