PS2X library

I have been trying to use the PS2X library for a project, but when i try to call it it gives me:

AArduino: 1.6.12 (Windows 10), Board: "Intel® Galileo Gen2"

In file included from C:\Users\Ben\Documents\Arduino\PS2X_Example\PS2X_Example.ino:1:0:

C:\Users\Ben\Documents\Arduino\libraries\PS2X_lib/PS2X_lib.h:91:20: fatal error: avr/io.h: No such file or directory

compilation terminated.

exit status 1
Error compiling for board Intel® Galileo Gen2.

But if you look at the image i attached, it clearly shows it does exist. What happened?

Captur.JPG

Sickarelli:
C:\Users\Ben\Documents\Arduino\libraries\PS2X_lib/PS2X_lib.h:91:20: fatal error: avr/io.h: No such file or directory

...

But if you look at the image i attached, it clearly shows it does exist. What happened?

It's saying avr/io.h doesn't exist, not PS2X_lib.h. The reason is that library is written for AVR architecture, not the i586 architecture of the Galileo. You have three options to solve this issue:

  • Use an AVR board such as Uno, Nano, Pro Mini, Mega, etc.
  • Find a library that is compatible with Galileo.
  • Port the library to Galileo.

I think #1 is the best option. The AVR boards are extremely cheap, well supported, and should be capable of any project at your skill level.

I really would like to use a Galileo, how can I try the third option?

Lots of time and research and trial and error. You will need to dig into the library source code and find all the dependencies it has from avr/io.h and the files included by io.h and convert them to their Galileo equivalent.

Ideally this would be a complete port which could be used to provide Galileo compatibility for any code that is written to use avr/io.h. This would be a significant contribution to the community if you made it publicly available. It may be easier to only do a partial port for the parts needed for this specific library.

There is some more information at:
https://communities.intel.com/thread/49475