1 of 1 people found this helpful
When you say not working with the Galileo do you mean it does not even compile? When I tried to compile this code on the Galileo it did not work, it seems like there are some defines missing.
At this point there are two different options. Try to figure out what the android defines are doing, and then figure out how to create those defines for the Galileo. This could be done by searching through the library files for the Arduino.
The other option, and perhaps better option, would be to do the analog read from Linux. For that, you would need two documents. One is the IO Mapping document, second, is Sergey's blog on how to use the pins from within Linux. http://www.malinov.com/Home/sergey-s-blog/intelgalileo-programminggpiofromlinux (look in the Analog Input section).
I have tried the analog reading from Linux, and it works, and it seems fast. I am not sure if it is fast enough?