Why I got this error?
Arduino: 1.6.9 (Windows 10), Board: "Arduino Mega ADK"
In file included from C:UsersDisheetDownloadshumanoid_1humanoid_1.ino:1:0:
C:UsersDisheetDocumentsArduinolibrariesax12v2/ax12.h:66:23: error: conflicting declaration 'typedef unsigned char boolean'
typedef unsigned char boolean;
^
In file included from sketchhumanoid_1.ino.cpp:1:0:
C:Program Files (x86)Arduinohardwarearduinoavrcoresarduino/Arduino.h:117:14: error: 'boolean' has a previous declaration as 'typedef bool boolean'
typedef bool boolean;
^
C:UsersDisheetDownloadshumanoid_1humanoid_1.ino: In function 'void setup()':
humanoid_1:5: error: 'SetPosition' was not declared in this scope
SetPosition(1,0);////id,posiotin 0-1023
^
C:UsersDisheetDownloadshumanoid_1humanoid_1.ino: In function 'void loop()':
humanoid_1:13: error: 'SetPosition' was not declared in this scope
SetPosition(1,512);
^
Multiple libraries were found for "ax12.h" Used: C:UsersDisheetDocumentsArduinolibrariesax12v2 Not used: C:UsersDisheetDocumentsArduinolibrariesBioloid exit status 1 'SetPosition' was not declared in this scope
This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
You'll need to find typedef unsigned char boolean;
in your library and change it to match the version in Arduino.h.
boolean
is already a typedef in Arduino.h, and it is a bool
,not unsigned char
.
In the AX12 library search for this: https://github.com/7Robot/Arduino/blob/master/AX12/libraries/ax12/ax12.h#L66
And change it to typedef bool boolean;
.
This was updated a while ago, so your IDE version is newer than the AX12 library.
链接地址: http://www.djcxy.com/p/78608.html下一篇: 为什么我得到这个错误?