Hi:
I have searched and tried the various reinstalling libraries and such to no avail. I have code that will use irrecv.enableIRIn(); // Start the receiver with no issues, but in my new sketch it gives me the above error and I am not sure why.
My code is:
#include <boarddefs.h>
#include <IRremote.h>
#include <IRremoteInt.h>
#include <ir_Lego_PF_BitStreamEncoder.h>
#include <Adafruit_NeoPixel.h>
int IRpin = 02; // pin for the IR sensor
IRrecv irrecv(IRpin);
decode_results results;
#define PIN 1
#ifdef __AVR__
#include <avr/power.h>
#endif
boolean LEDon = true; // initializing LEDon as true
Adafruit_NeoPixel strip = Adafruit_NeoPixel(36
, PIN, NEO_GRB + NEO_KHZ800);
void setup()
{
strip.begin();
strip.show(); // Initialize all pixels to 'off'
}
irrecv.enableIRIn(); // Start the receiver
}
void loop()
{
uint32_t gold = strip.Color(255, 255, 0);
uint32_t blue = strip.Color(0, 0, 255);
uint32_t green = strip.Color(0, 255, 0);
if (irrecv.decode(&results))
{
irrecv.resume(); // Receive the next value
}
switch(results.value)
{
case 16738455:
for( int i = 0; i<36; i++){
strip.setPixelColor(i, blue);
strip.show();
} // Solid Blue
break;
case 16724175:
for( int i = 0; i<36; i++){
strip.setPixelColor(i, green);
strip.show();
} // Solid Green
break;
case 16718055:
for( int i = 0; i<36; i++){
strip.setPixelColor(i, gold);
strip.show();
} // Solid Gold
break;
}
}
My goal is to make a neopixel ring turn to various colors and styles with the IR remote but this code won't compile and I am not sure why.
Thanks for any help