lower white level, test simtronyx rgb library
This commit is contained in:
parent
991ad961db
commit
724f093748
@ -1,4 +1,5 @@
|
|||||||
#include <IRremote.h>
|
#include <IRremote.h>
|
||||||
|
#include <simtronyx_RGB_LED.h>
|
||||||
|
|
||||||
#define LED_WHITE 5
|
#define LED_WHITE 5
|
||||||
#define LED_GREEN 6
|
#define LED_GREEN 6
|
||||||
@ -35,10 +36,11 @@
|
|||||||
#define IR_KEY_LIGHT16 0xF7E01F
|
#define IR_KEY_LIGHT16 0xF7E01F
|
||||||
|
|
||||||
int leds[] = {LED_WHITE, LED_GREEN, LED_BLUE, LED_RED};
|
int leds[] = {LED_WHITE, LED_GREEN, LED_BLUE, LED_RED};
|
||||||
int white = 0x80;
|
int white = 0x01;
|
||||||
|
|
||||||
IRrecv irrecv(IR_PIN);
|
IRrecv irrecv(IR_PIN);
|
||||||
decode_results results;
|
decode_results results;
|
||||||
|
simtronyx_RGB_LED strip(LED_RED, LED_GREEN, LED_BLUE);
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
@ -48,9 +50,15 @@ void setup() {
|
|||||||
analogWrite(LED_WHITE, white);
|
analogWrite(LED_WHITE, white);
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
irrecv.enableIRIn(); // Start the receiver
|
irrecv.enableIRIn(); // Start the receiver
|
||||||
|
|
||||||
|
strip.animateColorAdd(255,0,0,100);
|
||||||
|
strip.animateColorAdd(0,255,0,100);
|
||||||
|
strip.animateColorAdd(0,0,255,100);
|
||||||
|
strip.animateStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
|
strip.loop();
|
||||||
if (irrecv.decode(&results)) {
|
if (irrecv.decode(&results)) {
|
||||||
if (results.decode_type == IR_PROTOCOL) {
|
if (results.decode_type == IR_PROTOCOL) {
|
||||||
if (results.value != 0xFFFFFFFF) {
|
if (results.value != 0xFFFFFFFF) {
|
||||||
|
Loading…
Reference in New Issue
Block a user