Sending IR codes through EthernetShield to IRlibrary...

Hello,

I am making one of those remotes that you can use on your smartphones etc to control everything IR and a bit more with the help of an Arduino.

I have created a server in Arduino and can send in the codes and get them to display on a webpage like so:
len: 32
type: NEC
value: 20DF10EF

But when I put them into an IRsend command I get this error:
send_ir_from_web.cpp: In function 'void loop()':
send_ir_from_web:76: error: no matching function for call to 'IRsend::sendNEC(String&, String&)'
E:\arduino-0022\libraries\IRremote/IRremote.h:73: note: candidates are: void IRsend::sendNEC(long unsigned int, int)

I'm guessing it has something to do with the wrong datatype. The values as strings from the URL. What format should the values be in, and how do I get them to that value?

Also in all IRlibrary samples the values are written as: 0x20DF10EF. Once again, me strings and arduino, I cant just add 0x to the beginning right? I have to convert to HEX somehow?

Anyways, thanks in advance for any advice, and hope I can show you some finished result soon :slight_smile:

/Kristian

for me sendNEC worked with decimals; try sendNEC(551489775,32);

Thanks Adis, it wasnt my question, but after I figured toInt() out it solved my problem *that and moving my IR closer to the TV :slight_smile:

Anyways, I got the string values to int by doing .toInt() and now it compiles...

Now we come to the RAW codes :slight_smile:

The IR library spits out something like this:
length: 75
value: m4400 s4550 m450 s550 m450 s550 m450 s550 m450 s550 m400 s600 m400 s1600 m400 s600 m400 s600 m400 s600 m400 s600 m400 s600 m400 s600 m400 s600 m400 s600 m400 s600 m400 s550 m400 s4600 m400 s1600 m400 s600 m400 s600 m400 s550 m450 s550 m450 s550 m450 s550 m450 s550 m450 s550 m450 s550 m400 s600 m400 s650 m450 s1550 m400 s1600 m400 s1600 m400 s1600 m400 s1600 m400 s1600 m400 s1600 m400
-1

It is taken from one of the ir example sketches... Ill see what happens if I just send this in, dont think itll work though? Ill get back on that, or if anyone else has a thought...