Hi
It is something strange that I don’t understand.
I did download the library for the IR LED from here
And I import it (Have try both ZIP import and manual import to my arduino Document folder)
I have get some info from my NEC remote control and I was thinking to use sendNEC instead of send raw
But I can’t not even get the Example to work??
/*
* IRremote: IRsendDemo - demonstrates sending IR codes with IRsend
* An IR LED must be connected to Arduino PWM pin 3.
* Version 0.1 July, 2009
* Copyright 2009 Ken Shirriff
* http://arcfn.com
*/
#include <IRremote.h>
IRsend irsend;
void setup()
{
Serial.begin(9600);
}
void loop() {
if (Serial.read() != -1) {
for (int i = 0; i < 3; i++) {
irsend.sendSony(0xa90, 12); // Sony TV power code
delay(40);
}
}
}
It say
Build options changed, rebuilding all
Using library IRremote in folder: C:\Users\admcarjoh1\Documents\Arduino\libraries\Arduino-IRremote-masterC:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10603 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard -IC:\Users\admcarjoh1\Documents\Arduino\libraries\Arduino-IRremote-master C:\Users\ADMCAR~1\AppData\Local\Temp\build1256112843956322489.tmp\IRsendDemo.cpp -o C:\Users\ADMCAR~1\AppData\Local\Temp\build1256112843956322489.tmp\IRsendDemo.cpp.o
IRsendDemo.ino: In function ‘void loop()’:
IRsendDemo.ino:21:14: error: ‘class IRsend’ has no member named ‘sendSony’
Fel vid kompilering.
I know I can make mistake when I write a code but no the example
The code I was going to use later is this
/*
* IRremote: IRsendDemo - demonstrates sending IR codes with IRsend
* An IR LED must be connected to Arduino PWM pin 3.
* Version 0.1 July, 2009
* Copyright 2009 Ken Shirriff
* http://arcfn.com
*/
#include <IRremote.h>
IRsend irsend;
void setup()
{
Serial.begin(9600);
}
void loop() {
if (Serial.read() != -1) {
for (int i = 0; i < 3; i++) {
irsend.sendNEC(0x189710EF, 32);
delay(100);
irsend.sendNEC(0xFFFFFFFF, 32);
}
}
}