|
PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
14 unsigned int RGBleds[LED_COUNT];
23 ws2812_set(ws2812b, RGB_PIN, RGBleds, LED_COUNT);
26 print(
"LED light control\n\n");
30 for (
int zz = 0; zz < 3; zz++) {
31 for (
int z = 0; z < 15; z++) {
36 for (
int z = 0; z < 15; z++) {
47 print(
"RGB light control\n\n");
51 for (
int i = 0; i < 4; i++) {
52 RGBleds[i] = 0x330000;
54 ws2812_set(ws2812b, RGB_PIN, RGBleds, LED_COUNT);
57 for (
int i = 0; i < 4; i++) {
58 RGBleds[i] = 0x003300;
60 ws2812_set(ws2812b, RGB_PIN, RGBleds, LED_COUNT);
64 for (
int i = 0; i < 4; i++) {
65 RGBleds[i] = 0x000033;
67 ws2812_set(ws2812b, RGB_PIN, RGBleds, LED_COUNT);
70 for (
int i = 0; i < 4; i++) {
71 RGBleds[i] = 0x000000;
73 ws2812_set(ws2812b, RGB_PIN, RGBleds, LED_COUNT);
77 print(
"Press B to exit.\n\n");
94 if(states == 0b10000000)
break;
103 print(
"Tilt with accelerometer\n\n");
130 print(
"Display\n\n");
139 for(
int i = 0; i < 8; i++)
147 for(
x = 0;
x < 128;
x++)
149 y = 64 - (
x *
x / 32);
int print(const char *format,...) __attribute__((format(printf
Print format "..." args to the default simple terminal device. The output is limited to 256 bytes.
#define CLKFREQ
Returns the current clock frequency.
void ws2812_set(ws2812_t *driver, int pin, uint32_t *colors, int count)
Set color pattern on a chain of LEDs.
ws2812_t * ws2812b_open(void)
Open a driver for WS2812B chips.