I found a beautiful effect from neopixel-playground web site.
neopixel-playground
Video
But the problem is he using a Potentiometer and 3-Axis Accelerometer Module to make this effect work.
I need to play this effect one after another using 144 neopixel strip,without using Potentiometer and 3-Axis Accelerometer Module.
(I need to use Adafruit NeoPixel library not FAST LED.)
Can you please help me?
I attached the code,txt file
neopixel-playground
Code.txt (19.7 KB)
amila0330:
(I need to use Adafruit NeoPixel library not FAST LED.)
Can you please help me?
The sketch author states:
"This project makes use of the FastLED library.The FastLED library can be found here: http://fastled.io/ "
need to play this effect one after another using 144 neopixel strip,without using Potentiometer and 3-Axis Accelerometer Module.
So what do you want to use to replace those. Without changing values the display is going to be very static.
How about whenever the code reads a value then you substitute a random value. Look at the random number generator function to see how to generate one.
Grumpy_Mike:
So what do you want to use to replace those. Without changing values the display is going to be very static.
How about whenever the code reads a value then you substitute a random value. Look at the random number generator function to see how to generate one.
can you help me to edit the code?
At the top of what you're calling "the code", you will find the following line:
#include "FastLED.h"
That means that the use of FastLED.h is required, presenting a conflict with your original post "(I need to use Adafruit NeoPixel library not FAST LED)"
Big Problem.
Are you asking somebody to "help" re-write it - using the Adafruit neopixels library?
Yes I can help, but I will not do it for you.
Steps to take:-
-
Identify where the pot is read. This is simply where the analogRead(potPin) command is on the right hand side of an equals sign. Comment out this line and replace the analogRead(potPin) with with a function that returns a random number between 0 and 1023.
-
Identify where the acclerometer is read. This is simply where the analogRead(yPin) command is on the right hand side of an equals sign. Comment out this line and replace the analogRead(yPin) with with a function that returns a random number between 0 and 1023.
Note that all of these display modes won't look good because you have no sensors. I would have thought the whole idea of this is that the lights are responding to the sensors. For example what do you expect the LevelSense display will look like?
I would recommend that if you do not want to use an accelerometer then just use a pot on pin Analog 4 and a brightness pot on pin Analog 0 .
Note this still needs the FastLED libiary.