Pages: [1]   Go Down
Author Topic: Why can't I resolve the imports and compile sketch ?  (Read 1561 times)
0 Members and 1 Guest are viewing this topic.
Targu Mures
Offline Offline
Newbie
*
Karma: 0
Posts: 3
android developer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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! smiley-sad
« Last Edit: February 03, 2012, 04:53:28 pm by androidu » Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 495
Posts: 19015
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


Targu Mures
Offline Offline
Newbie
*
Karma: 0
Posts: 3
android developer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

#if defined(ARDUINO) && ARDUINO >= 100
  #include "Arduino.h"
#else
  #include "WProgram.h"
#endif


I had to edit the AndroidAccessory.h
Logged

0
Offline Offline
Shannon Member
****
Karma: 214
Posts: 12390
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

[ I won't respond to messages, use the forum please ]

Targu Mures
Offline Offline
Newbie
*
Karma: 0
Posts: 3
android developer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried importing everything and importing AndroidAccessories.h the last and I get the same errors

#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>
Logged

Pages: [1]   Go Up
Jump to: