Class to display Time in words on WS2812B-LED-Stripe. * Drive LEDs with PixelArray * with 11x10 LED-Matrix and 4 minute-LEDS * GERMAN LAYOUT !!!!!!

Dependents:   WordClock

Embed: (wiki syntax)

« Back to documentation index

WordClock Class Reference

WordClock Class Reference

Class: WorldClock A class to show time in words with LED-Stripe. More...

#include <WordClock.h>

Public Member Functions

 WordClock (PinName pin)
 Create a WordClock Object with WS2812B-LEDs connected to pin (must be a SPI-MOSI-pin)
void display_time (int hour, int minute, int second=0)
 display_time(hour, minute, second)
void test_display (int option, int index=0)
 test_display(int option)
neopixel::Pixel hsvToRgb (float h, float s, float v)
 Convert a color from the HSV representation to RGB.
void sz ()
 display SZ for Sommerzeit
void wz ()
 display WZ for Winterzeit

Detailed Description

Class: WorldClock A class to show time in words with LED-Stripe.

Definition at line 37 of file WordClock.h.


Constructor & Destructor Documentation

WordClock ( PinName  pin )

Create a WordClock Object with WS2812B-LEDs connected to pin (must be a SPI-MOSI-pin)

Parameters:
pinSPI-MOSI pin to connect LEDs

Definition at line 5 of file WordClock.cpp.


Member Function Documentation

void display_time ( int  hour,
int  minute,
int  second = 0 
)

display_time(hour, minute, second)

Parameters:
timetime to display

Definition at line 458 of file WordClock.cpp.

neopixel::Pixel hsvToRgb ( float  h,
float  s,
float  v 
)

Convert a color from the HSV representation to RGB.

Parameters:
hhue 0.0 ... 1.0
ssaturation 0.0 ... 1.0
vvalue 0.0 ... 1.0

Definition at line 29 of file WordClock.cpp.

void sz (  )

display SZ for Sommerzeit

Definition at line 298 of file WordClock.cpp.

void test_display ( int  option,
int  index = 0 
)

test_display(int option)

Parameters:
optionoption for test 1 color gradient from red to red through hsv colors. 2 display one LED in White, full brightness. 3 display a word.
indexindex for test. Which LED/word to set. 0..NUMLEDS, 0..NUMWORDS

Definition at line 314 of file WordClock.cpp.

void wz (  )

display WZ for Winterzeit

Definition at line 306 of file WordClock.cpp.