Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: PixelArray WordClock_de ds3231 mbed
Fork of mbed_ws2812b by
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); } } }