Pinguino Forum
IR LIBRARY - Printable Version

+- Pinguino Forum (http://forum.pinguino.cc)
+-- Forum: Software (http://forum.pinguino.cc/forumdisplay.php?fid=7)
+--- Forum: Interfacing (http://forum.pinguino.cc/forumdisplay.php?fid=20)
+--- Thread: IR LIBRARY (/showthread.php?tid=4194)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25


IR LIBRARY - derf158 - 10-12-2013

i am looking for a IR library to decode like a sony IR remote.
thanks
fred


RE: IR LIBRARY - regis - 11-12-2013

I found this one on Google.
It seems quite easy to port to Pinguino and works with a lot of brands.

(10-12-2013, 01:52 PM)derf158 Wrote: i am looking for a IR library to decode like a sony IR remote.
thanks
fred



RE: IR LIBRARY - derf158 - 11-12-2013

(11-12-2013, 11:26 AM)regis Wrote: I found this one on Google.
It seems quite easy to port to Pinguino and works with a lot of brands.

(10-12-2013, 01:52 PM)derf158 Wrote: i am looking for a IR library to decode like a sony IR remote.
thanks
fred

Regis
What did you find?


RE: IR LIBRARY - regis - 11-12-2013

Oops, sorry : https://github.com/shirriff/Arduino-IRremote


RE: IR LIBRARY - derf158 - 12-12-2013

(11-12-2013, 03:15 PM)regis Wrote: Oops, sorry : https://github.com/shirriff/Arduino-IRremote


Regis I think I am going to need help on porting this into pinguino IDE . I was looking at the link for the arduino ir library. I noticed arduino.h wprogram.h I do not know how to handle the modification to these files. I did put the ir library files into the P8 library folder.i renamed IRremote.cpp to IRremote.c .


RE: IR LIBRARY - regis - 12-12-2013

The first thing I would do is to rename every C++ function in your IRremote.c file.
For example, rename IRsend:ConfusedendNEC in IRsend_sendNEC
Add every function in a pdl/IRremote.pdl file. For ex :
irsend.sendNEC IRsend_sendNEC#include <IRremote.c>
Try not to use output function except for debug purpose. So no Serial.print() in your code except if it's surrounded with #ifdef DEBUG / #endif.
Take a look at interrupt.c to see how interrupt works with PIC18F.
BLINKLED should be USERLED or just add #define BLINKLED USERLED
Good luck.


(12-12-2013, 01:11 PM)derf158 Wrote:
(11-12-2013, 03:15 PM)regis Wrote: Oops, sorry : https://github.com/shirriff/Arduino-IRremote


Regis I think I am going to need help on porting this into pinguino IDE . I was looking at the link for the arduino ir library. I noticed arduino.h wprogram.h I do not know how to handle the modification to these files. I did put the ir library files into the P8 library folder.i renamed IRremote.cpp to IRremote.c .



RE: IR LIBRARY - derf158 - 12-12-2013

(12-12-2013, 04:30 PM)regis Wrote: The first thing I would do is to rename every C++ function in your IRremote.c file.
For example, rename IRsend:ConfusedendNEC in IRsend_sendNEC
Add every function in a pdl/IRremote.pdl file. For ex :
irsend.sendNEC IRsend_sendNEC#include <IRremote.c>
Try not to use output function except for debug purpose. So no Serial.print() in your code except if it's surrounded with #ifdef DEBUG / #endif.
Take a look at interrupt.c to see how interrupt works with PIC18F.
BLINKLED should be USERLED or just add #define BLINKLED USERLED
Good luck.


(12-12-2013, 01:11 PM)derf158 Wrote:
(11-12-2013, 03:15 PM)regis Wrote: Oops, sorry : https://github.com/shirriff/Arduino-IRremote


Regis I think I am going to need help on porting this into pinguino IDE . I was looking at the link for the arduino ir library. I noticed arduino.h wprogram.h I do not know how to handle the modification to these files. I did put the ir library files into the P8 library folder.i renamed IRremote.cpp to IRremote.c .
ok I will work it thank you


RE: IR LIBRARY - derf158 - 16-12-2013

(12-12-2013, 07:45 PM)derf158 Wrote:
(12-12-2013, 04:30 PM)regis Wrote: The first thing I would do is to rename every C++ function in your IRremote.c file.
For example, rename IRsend:ConfusedendNEC in IRsend_sendNEC
Add every function in a pdl/IRremote.pdl file. For ex :
irsend.sendNEC IRsend_sendNEC#include <IRremote.c>
Try not to use output function except for debug purpose. So no Serial.print() in your code except if it's surrounded with #ifdef DEBUG / #endif.
Take a look at interrupt.c to see how interrupt works with PIC18F.
BLINKLED should be USERLED or just add #define BLINKLED USERLED
Good luck.


(12-12-2013, 01:11 PM)derf158 Wrote:
(11-12-2013, 03:15 PM)regis Wrote: Oops, sorry : https://github.com/shirriff/Arduino-IRremote


Regis I think I am going to need help on porting this into pinguino IDE . I was looking at the link for the arduino ir library. I noticed arduino.h wprogram.h I do not know how to handle the modification to these files. I did put the ir library files into the P8 library folder.i renamed IRremote.cpp to IRremote.c .
ok I will work it thank you
Regis i do not understand what i need to do with the pdl?
Add every function in a pdl/IRremote.pdl file. For ex :
irsend.sendNEC IRsend_sendNEC#include <IRremote.c>

thanks
fred


RE: IR LIBRARY - regis - 16-12-2013

Pdl files are Pinguino's Keyword files. They help the Pinguino preprocessor to translate C++ format instructions (name.function) to SDCC-understable C instructions (functions that are in the .c file that will be included in the core program).
Please, read this :
http://wiki.pinguino.cc/index.php/How_can_I_make_libraries_for_Pinguino%3F


RE: IR LIBRARY - dkmorb - 16-12-2013

Hey derf158,
if you share an hw schema, we can take a look together.

Bye