Tarek Lule / LED_WS2812

Dependencies:   WS2812 PixelArray

Fork of LED_WS2812 by CreaLab

Embed: (wiki syntax)

« Back to documentation index

LEDs_Car Class Reference

LEDs_Car Class Reference

Control 4 LEDs around the Car: front / rear, left / right. More...

#include <LEDs_Car.h>

Inherits LED_WS2812.

Public Member Functions

 LEDs_Car (PinName _PinOut, int _nbLeds)
 Create a Car-LED object to control the four LEDs around the car.

Detailed Description

Control 4 LEDs around the Car: front / rear, left / right.

Example:

 // --- Define the PIN where the LED band is connected -----
 LEDs_Car ledBand(PB_5,4);
 Setup rainbow colors for the ledBand
 ledBand.LEDsRainbow();
 Rotate the colors for the ledBand
 ledBand.StartRotation(0.6) ;
 Turn off the LEDs:
 ledBand.LEDsOff();

Definition at line 32 of file LEDs_Car.h.


Constructor & Destructor Documentation

LEDs_Car ( PinName  _PinOut,
int  _nbLeds 
)

Create a Car-LED object to control the four LEDs around the car.

Parameters:
PinNamePin Name through wich the LEDs are controlled
_nbLedsNumber of LEDs actually implemented, defaults to 4

Definition at line 40 of file LEDs_Car.h.