7
\$\begingroup\$

I'm trying to make a project using the Arduino ADK board and a Sony Ericsson Xperia Play running Android 2.3.4. For starters all I want to do is blink a LED from my Android device, using the nice tutorial found here. I managed to compile the Android app but I'm having big difficulties on the Arduino sketch. I can't resolve the imports and it won't compile. I understant there are some Arduino IDE version issues. I tried compiling on both 0023 and on 1.0. The furthest I could go with the code was getting these compile errors:

D:\arduino-0023\libraries\AndroidAccessory/AndroidAccessory.h:37: error: 'EP_RECORD' does not name a type
D:\arduino-0023\libraries\AndroidAccessory/AndroidAccessory.h:50: error: 'EP_RECORD' has not been declared
D:\arduino-0023\libraries\AndroidAccessory/AndroidAccessory.h:50: error: 'EP_RECORD' has not been declared
D:\arduino-0023\libraries\AndroidAccessory/AndroidAccessory.h:64: error: 'USB_NAK_LIMIT' was not declared in this scope

I think I read the whole documentation and I can't find a solution to my problem. Setting this up is such a pain... I really need to make this work.

m.Alin
10.9k20 gold badges66 silver badges90 bronze badges
asked Jan 29, 2012 at 14:11
\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

The library was written and tested in:

Arduino Alpha 0022

Have you tried this?

#if defined(ARDUINO) && ARDUINO >= 100
 #include "Arduino.h"
#else
 #include "WProgram.h" #endif 
answered Jan 30, 2012 at 3:27
\$\endgroup\$
1
  • 1
    \$\begingroup\$ yes I did :( this small header edit got me this far but still left me with the errors you see above... \$\endgroup\$ Commented Feb 1, 2012 at 21:23

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.