Pinguino Forum

Full Version: Wprogram.h in pinguino?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I´m trying to port a Keelog arduino code to pinguino, this code is using an Arduino library named Wprogram.h and it was change to Arduino.h in the Arduino IDE 1.X, so My question ends up been, what is the equivalent to WProgram.h/Arduino.h in pinguino?

Thank you in advance for you help.
(26-02-2016, 04:36 PM)Alfonso82 Wrote: [ -> ]I´m trying to port a Keelog arduino code to pinguino, this code is using an Arduino library named Wprogram.h and it was change to Arduino.h in the Arduino IDE 1.X, so My question ends up been, what is the equivalent to WProgram.h/Arduino.h in pinguino?

Thank you in advance for you help.

Hi Alfonso,
Perharps you only need  macro.h located in the p8\include\pinguino\core folder (ref. IDE V11).
Inside you find the BitRead macro to replace the Arduino bitRead :


    #define BitRead(val, n)         (((val) >> (n)) & 1)

Otherwise I suppose you know a bit of C language to convert the keeloq C++ library into a C library or more simply in a few C functions. I had a look to this library. It seems very very simple. 

André
Thank you gtcbreizh, I´ll give it a try and I´ll let you know.
It works gtcbreizh, I just added the macro.h, change the name of the functions and added a couple of variables and it compiles, I have´nt tested the code to see if it work, but I got high hopes, Thank you.