Tried changing WProgram to Arduino, no luck. It finds the header and sources of Arduino.h, but fails to find definitions for all the constants/definitions of the variables used throughout the Max3421e.cpp file. I also find it weird that in order to use a "click to use" library, I have to go in and edit header files.
Does anyone have any ideas of what is going wrong here, or can anyone point me to an updated/actually working copy of the UsbHost library?
Peter_n:
Yes, the "WProgram.h" is old, you need the "Arduino.h".
Where did you find that library ?
Which Arduio IDE version are you using ?
Tell us what the error messages are after using the "Arduino.h".
I've tried several. 1.5.8 for Java7 and Java6, building from source on github (branches with that lib included) and no dice with any. When clicking Add Library, it defaults the source directory to Usb_Host_Shield folder in the Arduino install directory, which I suspect that to be the main cause of the error. There are two options in the drop down menu, UsbHost and Usb_Host_Shield. The auto-generated #includes the IDE dumps in are different for each selection, however when building with the headers from UsbHost, the source directory it is looking in is Usb_Host_Shield.
The errors are too great to list here when I switch it to the Arduino header. But basically, it is every VAR_IN_CAPS that is used, that is not declared in that header file, which there are a lot.
Anyway, it will probably take more time for me to figure out how to get this library to compile correctly, than it would for me to write a simple implementation of Keyboard.press()/release() myself.
But, please follow up, because it would be good to have a record of the error and solution in the archives.
Arduino 1.5.8 BETA in Windows 7 doesn't need any additional Java to be installed. If Java is installed in Windows 7 it might cause problems with different versions of some Java parts. So I always advise to remove all Java, and use JavaRa to remove the remaining pieces of Java. Remove Arduino (not the projects folder with your sketches) and use the zip file. Unzip that in your home folder and run Arduino from there.
Check the 'libraries' folder in your projects folder if everything is okay, and no different folders with the same (user installed) libraries.
In 1.5.8, the PROGMEM does no longer use "prog_char" or "prog_uchar", they should be changed into "const char" or "const byte" and so on.