this code only work for 16 neopixel and what i want is to work for 60 neopixel but i dont know how and where to change . PLEASE HELP
time_loop.ino (5.9 KB)
this code only work for 16 neopixel and what i want is to work for 60 neopixel but i dont know how and where to change . PLEASE HELP
time_loop.ino (5.9 KB)
mizanjenko:
this code only work for 16 neopixel and what i want is to work for 60 neopixel but i dont know how and where to change . PLEASE HELP
Nonsense. When the pixel count is other than 16, the code does something. You failed to explain what it actually does.
Adafruit_NeoPixel strip = Adafruit_NeoPixel(100, PIN, NEO_GRB + NEO_KHZ800);
The first argument is the number of pixels. Do you mean 60 or 100 or 168468048604?
void ClockPositions::update()
{
second = map ((millis() % 60000), 0, 60000, 0, 15);
milli = map ((millis() % 1000), 0, 1000, 0, 16);
hour = map (10 % 12, 0, 12, 0, 16);
minute = map (31 % 60, 0, 60, 0, 16);
}
I think you have to change those 16's to 60's. And maybe that '15' is a typo or you have to change it to 59.
void ClockSegments::draw()
{
clear();
add_color (positions.minute % 16, minute_color);
add_color (positions.hour % 16, hour_color );
add_color ((positions.hour+1) % 16, hour_color );
add_color (positions.second % 16, second_color);
add_color ((positions.second+1) % 16, second_color);
add_color ((positions.second+2) % 16, second_color);
add_color (positions.milli % 16, milli_color);
add_color ((positions.milli+1) % 16, milli_color);
add_color ((positions.milli+2) % 16, milli_color);
strip.show ();
}
I think you have to change those 16's to 60's.
Are there any other places where the number 16 (or 15) is used? You might have to change them to 60 as well.