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
main.cpp
- Committer:
- charly
- Date:
- 2017-11-02
- Revision:
- 1:23535cfbf924
- Parent:
- 0:afb6ebe20c1f
- Child:
- 2:d39f37d64441
File content as of revision 1:23535cfbf924:
// Wordclock with WS2812-LED-Stripe // with 11x10 LED-Matrix and 4 minute-LEDS /* ESKISTLFÜNF ZEHNZWANZIG DREIVIERTEL TGNACHVORJM HALBXZWÖLFP ZWEINSIEBEN KDREIRHFÜNF ELFNEUNVIER WACHTZEHNRS BSECHSFMUHR **** */ #include "mbed.h" #include "neopixel.h" #include "WordClock.h" // brigtness beween 0 and 1.0 #define BRIGHTNESS 0.5 int main() { // WordClock object with leds connected to p5 (MOSI) WordClock clock(p5); Timer timer; time_t now; { timer.start(); while(1) { // Update the colors array. uint32_t time = timer.read_ms(); for(int i = 0; i < NUMLEDS; i++) { uint8_t phase = (time >> 4) - (i << 2); //ledstripe[i] = hsvToRgb(phase / 256.0, 1.0, BRIGHTNESS); } clock.display_time(now); } } }