WordClock-Program to display time in words on WS2812B-LED-Stripe. With DS3231 RTC
Dependencies: PixelArray WordClock_de ds3231 mbed
Fork of mbed_ws2812b by
WordClock
Yet another wordclock...
Program for displaying time in (german) words on WS2812B LED-Matrix. Uses DS3231 RTC .
More fotos see:
https://photos.app.goo.gl/mSN6G145IdupbKv13
Diff: main.cpp
- Revision:
- 3:ebe0c4fa97b8
- Parent:
- 2:d39f37d64441
- Child:
- 4:ed0ac1dd6ae4
--- a/main.cpp Sun Nov 05 10:27:14 2017 +0000 +++ b/main.cpp Sun Nov 05 18:25:59 2017 +0000 @@ -40,21 +40,29 @@ timer.start(); while(1) { + // time fast forward + for (int h=0; h<=23; h++) { + for (int m=0; m<=59; m++) { + clock.display_time(h,m); + wait_ms(500); + } + } + // all words - for (int i=1; i<=NUMWORDS;i++) { + for (int i=1; i<=NUMWORDS; i++) { clock.test_display(3,i); - wait_ms(800); - } + wait_ms(800); + } //all leds on with rainbow colors while ( int(timer.read()/10.0) %2 == 0) { clock.test_display(1); wait_ms(100); } // every led on for 250ms - for (int i=0; i<NUMLEDS;i++) { - clock.test_display(2,i); - wait_ms(250); - } + for (int i=0; i<NUMLEDS; i++) { + clock.test_display(2,i); + wait_ms(250); + } timer.reset(); } }