我开始使用带有主机屏蔽的Arduino Mega 2560测试Android ADK。我把demokit.pde放到aruduino IDE上,就像android文档所给出的那样。但我无法将demokit.pde编译为将其上传到Arduino板。任何人都可以帮我提一些建议吗?
提前致谢
Arduino IDE中显示的错误消息:
In file included from demokit.cpp:1:
/usr/share/arduino/libraries/Wire/Wire.h:23:22: error: /usr/share/arduino/libraries/USB_Host_Shield/inttypes.h: Permission denied
demokit.cpp:4:22: error: /usr/share/arduino/libraries/USB_Host_Shield/Max3421e.h: Permission denied
demokit.cpp:5:17: error: /usr/share/arduino/libraries/USB_Host_Shield/Usb.h: Permission denied
demokit.cpp:6:30: error: /usr/share/arduino/libraries/USB_Host_Shield/AndroidAccessory.h: Permission denied
demokit.cpp:8:22: error: /usr/share/arduino/libraries/USB_Host_Shield/CapSense.h: Permission denied
In file included from demokit.cpp:43:
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:4:20: error: /usr/share/arduino/libraries/USB_Host_Shield/stdlib.h: Permission denied
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:5:20: error: /usr/share/arduino/libraries/USB_Host_Shield/string.h: Permission denied
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:6:18: error: /usr/share/arduino/libraries/USB_Host_Shield/math.h: Permission denied
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:8:27: error: /usr/share/arduino/libraries/USB_Host_Shield/avr/interrupt.h: Permission denied
In file included from /usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:10,
from demokit.cpp:43:
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:28:20: error: /usr/share/arduino/libraries/USB_Host_Shield/avr/io.h: Permission denied
In file included from /usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:13,
from demokit.cpp:43:
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:23:19: error: /usr/share/arduino/libraries/USB_Host_Shield/ctype.h: Permission denied
In file included from /usr/share/arduino/hardware/arduino/cores/arduino/Stream.h:24,
from /usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:27,
from /usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:15,
from demokit.cpp:43:
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:24:33: error: /usr/share/arduino/libraries/USB_Host_Shield/stdio.h: Permission denied
In file included from demokit.cpp:1:
/usr/share/arduino/libraries/Wire/Wire.h:30: error: ‘uint8_t’ does not name a type
/usr/share/arduino/libraries/Wire/Wire.h:31: error: ‘uint8_t’ does not name a type
/usr/share/arduino/libraries/Wire/Wire.h:32: error: ‘uint8_t’ does not name a type
/usr/share/arduino/libraries/Wire/Wire.h:34: error: ‘uint8_t’ does not name a type
/usr/share/arduino/libraries/Wire/Wire.h:35: error: ‘uint8_t’ does not name a type
/usr/share/arduino/libraries/Wire/Wire.h:36: error: ‘uint8_t’ does not name a type
/usr/share/arduino/libraries/Wire/Wire.h:37: error: ‘uint8_t’ does not name a type
/usr/share/arduino/libraries/Wire/Wire.h:39: error: ‘uint8_t’ does not name a type
/usr/share/arduino/libraries/Wire/Wire.h:43: error: ‘uint8_t’ has not been declared
/usr/share/arduino/libraries/Wire/Wire.h:47: error: ‘uint8_t’ has not been declared
/usr/share/arduino/libraries/Wire/Wire.h:48: error: ‘void TwoWire::begin(int)’ cannot be overloaded
/usr/share/arduino/libraries/Wire/Wire.h:47: error: with ‘void TwoWire::begin(int)’
/usr/share/arduino/libraries/Wire/Wire.h:49: error: ‘uint8_t’ has not been declared
/usr/share/arduino/libraries/Wire/Wire.h:50: error: ‘void TwoWire::beginTransmission(int)’ cannot be overloaded
/usr/share/arduino/libraries/Wire/Wire.h:49: error: with ‘void TwoWire::beginTransmission(int)’
/usr/share/arduino/libraries/Wire/Wire.h:51: error: ‘uint8_t’ does not name a type
/usr/share/arduino/libraries/Wire/Wire.h:52: error: ‘uint8_t’ does not name a type
/usr/share/arduino/libraries/Wire/Wire.h:53: error: ‘uint8_t’ does not name a type
/usr/share/arduino/libraries/Wire/Wire.h:54: error: ‘uint8_t’ has not been declared
/usr/share/arduino/libraries/Wire/Wire.h:55: error: ‘uint8_t’ has not been declared
/usr/share/arduino/libraries/Wire/Wire.h:55: error: ‘uint8_t’ has not been declared
/usr/share/arduino/libraries/Wire/Wire.h:56: error: ‘void TwoWire::send(int)’ cannot be overloaded
/usr/share/arduino/libraries/Wire/Wire.h:54: error: with ‘void TwoWire::send(int)’
/usr/share/arduino/libraries/Wire/Wire.h:58: error: ‘uint8_t’ does not name a type
/usr/share/arduino/libraries/Wire/Wire.h:59: error: ‘uint8_t’ does not name a type
In file included from demokit.cpp:2:
/usr/share/arduino/libraries/Servo/Servo.h:100: error: ‘uint8_t’ does not name a type
/usr/share/arduino/libraries/Servo/Servo.h:101: error: ‘uint8_t’ does not name a type
/usr/share/arduino/libraries/Servo/Servo.h:113: error: ‘uint8_t’ does not name a type
/usr/share/arduino/libraries/Servo/Servo.h:114: error: ‘uint8_t’ does not name a type
/usr/share/arduino/libraries/Servo/Servo.h:122: error: ‘uint8_t’ does not name a type
/usr/share/arduino/libraries/Servo/Servo.h:123: error: ‘int8_t’ does not name a type
/usr/share/arduino/libraries/Servo/Servo.h:124: error: ‘int8_t’ does not name a type
In file included from /usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:10,
from demokit.cpp:43:
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:104: error: ‘uint8_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:105: error: ‘uint8_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:109: error: variable or field ‘pinMode’ declared void
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:109: error: ‘uint8_t’ was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:109: error: ‘uint8_t’ was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:110: error: variable or field ‘digitalWrite’ declared void
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:110: error: ‘uint8_t’ was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:110: error: ‘uint8_t’ was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:111: error: ‘uint8_t’ was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:112: error: ‘uint8_t’ was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:113: error: variable or field ‘analogReference’ declared void
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:113: error: ‘uint8_t’ was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:114: error: variable or field ‘analogWrite’ declared void
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:114: error: ‘uint8_t’ was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:114: error: expected primary-expression before ‘int’
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:120: error: ‘uint8_t’ was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:120: error: ‘uint8_t’ was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:120: error: expected primary-expression before ‘unsigned’
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:120: error: initializer expression list treated as compound expression
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:122: error: variable or field ‘shiftOut’ declared void
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:122: error: ‘uint8_t’ was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:122: error: ‘uint8_t’ was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:122: error: ‘uint8_t’ was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:122: error: ‘uint8_t’ was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:123: error: ‘uint8_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:125: error: variable or field ‘attachInterrupt’ declared void
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:125: error: ‘uint8_t’ was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:125: error: expected primary-expression before ‘void’
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:125: error: expected primary-expression before ‘int’
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:126: error: variable or field ‘detachInterrupt’ declared void
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:126: error: ‘uint8_t’ was not declared in this scope
In file included from /usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:13,
from demokit.cpp:43:
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:26: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:27: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:28: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:29: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:30: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:31: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:32: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:33: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:34: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:35: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:36: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:37: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:38: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:46: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:54: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:62: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:69: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:76: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:83: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:90: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:97: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:104: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:112: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:121: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:128: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:136: error: ‘boolean’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h: In function ‘int toAscii(int)’:
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:146: error: ‘toascii’ was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h: In function ‘int toLowerCase(int)’:
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:158: error: ‘tolower’ was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h: In function ‘int toUpperCase(int)’:
/usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h:165: error: ‘toupper’ was not declared in this scope
In file included from /usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:14,
from demokit.cpp:43:
/usr/share/arduino/hardware/arduino/cores/arduino/WString.h: In destructor ‘String::~String()’:
/usr/share/arduino/hardware/arduino/cores/arduino/WString.h:40: error: ‘free’ was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/arduino/WString.h: In member function ‘void String::getBuffer(unsigned int)’:
/usr/share/arduino/hardware/arduino/cores/arduino/WString.h:102: error: ‘malloc’ was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/arduino/WString.h:103: error: ‘NULL’ was not declared in this scope
In file included from /usr/share/arduino/hardware/arduino/cores/arduino/Stream.h:24,
from /usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:27,
from /usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:15,
from demokit.cpp:43:
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h: At global scope:
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:37: error: ‘uint8_t’ has not been declared
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:38: error: ‘uint8_t’ has not been declared
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:40: error: ‘uint8_t’ has not been declared
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:42: error: expected ‘,’ or ‘...’ before ‘*’ token
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:42: error: ISO C++ forbids declaration of ‘uint8_t’ with no type
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:42: error: ‘virtual void Print::write(int)’ cannot be overloaded
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:40: error: with ‘virtual void Print::write(int)’
In file included from /usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:15,
from demokit.cpp:43:
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:35: error: ISO C++ forbids declaration of ‘uint8_t’ with no type
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:35: error: expected ‘;’ before ‘*’ token
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:36: error: ISO C++ forbids declaration of ‘uint8_t’ with no type
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:36: error: expected ‘;’ before ‘*’ token
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:37: error: ISO C++ forbids declaration of ‘uint8_t’ with no type
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:37: error: expected ‘;’ before ‘*’ token
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:38: error: ISO C++ forbids declaration of ‘uint8_t’ with no type
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:38: error: expected ‘;’ before ‘*’ token
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:39: error: ISO C++ forbids declaration of ‘uint8_t’ with no type
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:39: error: expected ‘;’ before ‘*’ token
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:40: error: ‘uint8_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:41: error: ‘uint8_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:42: error: ‘uint8_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:43: error: ‘uint8_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:44: error: ‘uint8_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:47: error: expected ‘,’ or ‘...’ before ‘*’ token
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:50: error: ISO C++ forbids declaration of ‘uint8_t’ with no type
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:57: error: ‘uint8_t’ has not been declared
In file included from demokit.cpp:43:
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:17: error: ‘uint16_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:18: error: ‘uint16_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:22: error: redefinition of ‘long unsigned int pulseIn’
/usr/share/arduino/hardware/arduino/cores/arduino/wiring.h:120: error: ‘long unsigned int pulseIn’ previously defined here
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:22: error: ‘uint8_t’ was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:22: error: ‘uint8_t’ was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:22: error: expected primary-expression before ‘unsigned’
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:24: error: variable or field ‘tone’ declared void
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:24: error: ‘uint8_t’ was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:24: error: expected primary-expression before ‘unsigned’
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:24: error: expected primary-expression before ‘unsigned’
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:25: error: variable or field ‘noTone’ declared void
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:25: error: ‘uint8_t’ was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:34: error: ‘uint8_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:35: error: ‘uint8_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:36: error: ‘uint8_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:37: error: ‘uint8_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:38: error: ‘uint8_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:39: error: ‘uint8_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:40: error: ‘uint8_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:41: error: ‘uint8_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:42: error: ‘uint8_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:43: error: ‘uint8_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:44: error: ‘uint8_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:45: error: ‘uint8_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:46: error: ‘uint8_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:47: error: ‘uint8_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:48: error: ‘uint8_t’ does not name a type
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:49: error: ‘uint8_t’ does not name a type
demokit:42: error: ‘AndroidAccessory’ does not name a type
demokit:51: error: ‘CapSense’ does not name a type
demokit.cpp: In function ‘void init_buttons()’:
demokit:58: error: ‘A6’ was not declared in this scope
demokit:58: error: ‘pinMode’ was not declared in this scope
demokit:59: error: ‘A7’ was not declared in this scope
demokit:60: error: ‘A8’ was not declared in this scope
demokit:61: error: ‘A9’ was not declared in this scope
demokit:64: error: ‘digitalWrite’ was not declared in this scope
demokit.cpp: In function ‘void init_relays()’:
demokit:73: error: ‘A0’ was not declared in this scope
demokit:73: error: ‘pinMode’ was not declared in this scope
demokit:74: error: ‘A1’ was not declared in this scope
demokit.cpp: In function ‘void init_leds()’:
demokit:80: error: ‘digitalWrite’ was not declared in this scope
demokit:84: error: ‘pinMode’ was not declared in this scope
demokit.cpp: At global scope:
demokit:107: error: ‘byte’ does not name a type
demokit.cpp: In function ‘void setup()’:
demokit:110: error: ‘Serial’ was not declared in this scope
demokit:119: error: ‘touch_robot’ was not declared in this scope
demokit:121: error: ‘class Servo’ has no member named ‘attach’
demokit:123: error: ‘class Servo’ has no member named ‘attach’
demokit:125: error: ‘class Servo’ has no member named ‘attach’
demokit:129: error: ‘b1’ was not declared in this scope
demokit:129: error: ‘A6’ was not declared in this scope
demokit:129: error: ‘digitalRead’ cannot be used as a function
demokit:130: error: ‘b2’ was not declared in this scope
demokit:130: error: ‘A7’ was not declared in this scope
demokit:130: error: ‘digitalRead’ cannot be used as a function
demokit:131: error: ‘b3’ was not declared in this scope
demokit:131: error: ‘A8’ was not declared in this scope
demokit:131: error: ‘digitalRead’ cannot be used as a function
demokit:132: error: ‘b4’ was not declared in this scope
demokit:132: error: ‘A9’ was not declared in this scope
demokit:132: error: ‘digitalRead’ cannot be used as a function
demokit:133: error: ‘c’ was not declared in this scope
demokit:135: error: ‘acc’ was not declared in this scope
demokit.cpp: In function ‘void loop()’:
demokit:140: error: ‘byte’ was not declared in this scope
demokit:140: error: expected `;' before ‘err’
demokit:141: error: expected `;' before ‘idle’
demokit:142: error: ‘byte’ does not name a type
demokit:143: error: expected `;' before ‘msg’
demokit:146: error: ‘acc’ was not declared in this scope
demokit:147: error: ‘msg’ was not declared in this scope
demokit:149: error: expected `;' before ‘b’
demokit:150: error: ‘uint16_t’ was not declared in this scope
demokit:150: error: expected `;' before ‘val’
demokit:158: error: ‘analogWrite’ was not declared in this scope
demokit:160: error: ‘analogWrite’ was not declared in this scope
demokit:162: error: ‘analogWrite’ was not declared in this scope
demokit:164: error: ‘analogWrite’ was not declared in this scope
demokit:166: error: ‘analogWrite’ was not declared in this scope
demokit:168: error: ‘analogWrite’ was not declared in this scope
demokit:170: error: ‘analogWrite’ was not declared in this scope
demokit:172: error: ‘analogWrite’ was not declared in this scope
demokit:174: error: ‘analogWrite’ was not declared in this scope
demokit:183: error: ‘A0’ was not declared in this scope
demokit:183: error: ‘digitalWrite’ was not declared in this scope
demokit:185: error: ‘A1’ was not declared in this scope
demokit:185: error: ‘digitalWrite’ was not declared in this scope
demokit:191: error: ‘b’ was not declared in this scope
demokit:191: error: ‘A6’ was not declared in this scope
demokit:191: error: ‘digitalRead’ cannot be used as a function
demokit:192: error: ‘b1’ was not declared in this scope
demokit:199: error: ‘A7’ was not declared in this scope
demokit:199: error: ‘digitalRead’ cannot be used as a function
demokit:200: error: ‘b2’ was not declared in this scope
demokit:207: error: ‘A8’ was not declared in this scope
demokit:207: error: ‘digitalRead’ cannot be used as a function
demokit:208: error: ‘b3’ was not declared in this scope
demokit:215: error: ‘A9’ was not declared in this scope
demokit:215: error: ‘digitalRead’ cannot be used as a function
demokit:216: error: ‘b4’ was not declared in this scope
demokit:223: error: ‘count’ was not declared in this scope
demokit:225: error: ‘val’ was not declared in this scope
demokit:225: error: ‘A3’ was not declared in this scope
demokit:225: error: ‘analogRead’ cannot be used as a function
demokit:233: error: ‘A2’ was not declared in this scope
demokit:233: error: ‘analogRead’ cannot be used as a function
demokit:249: error: ‘touch_robot’ was not declared in this scope
demokit:253: error: ‘c’ was not declared in this scope
demokit:265: error: ‘analogWrite’ was not declared in this scope
demokit:277: error: ‘A0’ was not declared in this scope
demokit:277: error: ‘digitalWrite’ was not declared in this scope
demokit:278: error: ‘A1’ was not declared in this scope
demokit.cpp: In function ‘void init_joystick(int)’:
demokit:288: error: ‘byte’ was not declared in this scope
demokit:288: error: expected `;' before ‘status’
demokit:290: error: ‘A9’ was not declared in this scope
demokit:290: error: ‘pinMode’ was not declared in this scope
demokit:291: error: ‘digitalWrite’ was not declared in this scope
demokit:293: error: ‘A10’ was not declared in this scope
demokit:296: error: ‘A11’ was not declared in this scope
demokit:307: error: ‘status’ was not declared in this scope
demokit:308: error: ‘status’ was not declared in this scope
demokit.cpp: In function ‘char joystick_interrupt()’:
demokit:365: error: ‘A10’ was not declared in this scope
demokit:365: error: ‘digitalRead’ cannot be used as a function
demokit.cpp: In function ‘char read_joy_reg(char)’:
demokit:376: error: ‘class TwoWire’ has no member named ‘write’
demokit:377: error: ‘class TwoWire’ has no member named ‘endTransmission’
demokit:379: error: ‘class TwoWire’ has no member named ‘requestFrom’
demokit:381: error: ‘class TwoWire’ has no member named ‘available’
demokit:382: error: ‘class TwoWire’ has no member named ‘read’
demokit.cpp: In function ‘void write_joy_reg(char, char)’:
demokit:390: error: ‘class TwoWire’ has no member named ‘write’
demokit:391: error: ‘class TwoWire’ has no member named ‘write’
demokit:392: error: ‘class TwoWire’ has no member named ‘endTransmission’
答案 0 :(得分:0)
我遇到与Arduino 1.0
类似的问题,如果您使用旧版本的问题相同,请说Arduino 0023
应该修复它。您可以从此处下载:http://arduino.cc/en/Main/Software
答案 1 :(得分:0)
所以你可以降级,或者你可以解决一些问题。我的一位教授发现this repository包含一个替换的USB_Host_Shield。将所有文件复制到〜/ libraries文件夹中的旧目录中。确保所有库都在〜/ sketchbook / libraries /中,然后重新启动IDE(版本1.0!)。转到文件 - > Sketchbook-> libraries-> USB_Host_Shield-> adk-> demokit-20。
您还需要更新AndroidAccessory.h。这将是〜/ sketchbook / libraries / Android Accesory,希望如此。打开它并替换
#include <Wprogram.h>
使用此块:
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
这将使其向后兼容旧版本的Arduino。 (感谢this网站获取该提示!)
然后从IDE中文件下拉列表中的sketchbook中刻录demokit-20。刚刚在我的主板上加载了固件。祝你好运。
编辑:所以我在我的手机上加载了Android代码(在多个设备上试过)并将固件刻录到ADK,但现在我无法让手机/设备识别ADK。尝试这个答案需要您自担风险。现在,我打算尝试降级。
EDIT2:降级到0022有效。快乐的狩猎。