I wanna develop a controller for my TV using Arduino and later on I plan to integrate this program with every device controlled by IR in my house. The problem is that the IRremote.h library allows me only to use some formacts like RAW for example. The website bellow generate the RAW code for any device:
http://irdb.tk/find/
The codes generated are like this:
+4512 -4512 +564 -1692 +564 -564 +564 -1692 +564 -1692 +564 -564 +564 -1692 +564 -564 +564 -564 +564 -1692 +564 -564 +564 -1692 +564 -1692 +564 -564 +564 -1692 +564 -564 +564 -564 +564 -564 +564 -1692 +564 -564 +564 -564 +564 -564 +564 -564 +564 -1692 +564 -564 +564 -1692 +564 -564 +564 -1692 +564 -1692 +564 -1692 +564 -1692 +564 -564 +564 -1692 +564 -44268
I have to use it like this in my sketch:
unsigned int raw[rawlen]:
{4512 ,4512 ,564 ,1692 ,564 ,564 ,564 ,1692 ,564 ,1692 ,564 ,564 ,564 ,1692 ,564 ,564 ,564 ,564 ,564 ,1692 ,564 ,564 ,564 ,1692 ,564 ,1692 ,564 ,564 ,564 ,1692 ,564 ,564 ,564 ,564 ,564 ,564 ,564 ,1692 ,564 ,564 ,564 ,564 ,564 ,564 ,564 ,564 ,564 ,1692 ,564 ,564 ,564 ,1692 ,564 ,564 ,564 ,1692 ,564 ,1692 ,564 ,1692 ,564 ,1692 ,564 ,564 ,564 ,1692 ,564 ,44268}
I have two problems:
1 - how can I know the rawlen of the code to set in my program?
2 - I would like to develop a function in which I put the code generated by this webstie, with the "+" and "-" and it has to replace this caracters with a ",".
How can I do this?