Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wprogram.h in pinguino?
26-02-2016, 04:36 PM,
#1
Wprogram.h in pinguino?
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.
Reply
26-02-2016, 07:51 PM,
#2
RE: Wprogram.h in pinguino?
(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é
Reply
27-02-2016, 05:14 AM,
#3
RE: Wprogram.h in pinguino?
Thank you gtcbreizh, I´ll give it a try and I´ll let you know.
Reply
27-02-2016, 05:29 AM,
#4
RE: Wprogram.h in pinguino?
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)