Go Down

Topic: Why can't I resolve the imports and compile sketch ? (Read 1 time) previous topic - next topic

androidu

Feb 03, 2012, 10:37 pm Last Edit: Feb 03, 2012, 10:53 pm by androidu Reason: 1
I tried to blink an LED using an arduino ADK and a sony ericsson xperia play running android 2.3.4 following the simple tutorial found here http://allaboutee.com/2011/12/31/arduino-adk-board-blink-an-led-with-your-phone-code-and-explanation/ on the android side everything is ok but I get these errors on compiling the sketch:

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 imported all the libraries and I tried compiling on arduino IDE version 0022, 0023 and 1.0 with the same results. Please help me! :(

Nick Gammon

Are they absolutely the only errors you get? Scroll back up and see if there are more. A Google for "error: 'EP_RECORD' does not name a type" returns quite a few matches.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

androidu

I was also getting WProgram.h not found error but then I found this edit which resolved that error :

[font=Courier new]#if defined(ARDUINO) && ARDUINO >= 100
  #include "Arduino.h"
#else
  #include "WProgram.h"
#endif
[/font]


I had to edit the [font=Courier new]AndroidAccessory.h[/font]

MarkT

Looks like its a library bug, you have to manually #include <Usb.h> before the #include <AndroidAccessory.h> since the latter depends on the former but doesn't do its own #include.
[ I won't respond to messages, use the forum please ]

androidu

I tried importing everything and importing [font=Courier new]AndroidAccessories.h[/font] the last and I get the same errors
[font=Courier new]
#include <address.h>
#include <adk.h>
#include <avrpins.h>
#include <cdcacm.h>
#include <cdcftdi.h>
#include <cdcprolific.h>
#include <confdescparser.h>
#include <hexdump.h>
#include <hid.h>
#include <hidboot.h>
#include <hidescriptorparser.h>
#include <hiduniversal.h>
#include <hidusagestr.h>
#include <max3421e.h>
#include <max_LCD.h>
#include <message.h>
#include <parsetools.h>
#include <printhex.h>
#include <Usb.h>
#include <usbhost.h>
#include <usbhub.h>
#include <usb_ch9.h>
#include <AndroidAccessory.h>
[/font]

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy