I tried to use 1.69 (Windows 10, 64bit) and it gives me an error Invalid library. This is the Servotor library that comes with the Hexy hexapod. I can compile it with 1.06 on the same machine with no problems but when I use 1.69 (and now 1.8) It gives me an error message on the SECOND call to a procedure in the Servotor library, telling me there is no such call. Any ideas??
W Massano
wmassano:
I tried to use 1.69 (Windows 10, 64bit) and it gives me an error Invalid library.
Please post the full text of the error message. Please use code tags(</> button on the toolbar).
wmassano:
It gives me an error message on the SECOND call to a procedure in the Servotor library, telling me there is no such call.
Please post the full text of the error message. Please use code tags(</> button on the toolbar).
Are you using the standard Servotor32_Firmware example sketch or your own code? If it's your own code then please post the code. Please use code tags(</> button on the toolbar) or attach if it's longer than the forum will allow.
Which version of the ArcBotics Boards hardware package are you using(shown at Tools > Board > Boards Manager > ArcBotics Boards)?
This code compiles:
#include "Servotor32.h" // call the servotor32 Library
Servotor32 hexy; // create a servotor32 object
void setup() {
hexy.begin();
}
void loop() {
// blink the status led
digitalWrite(STATUS_LED, HIGH);
hexy.delay_ms(500); // wait 500mS
digitalWrite(STATUS_LED, LOW);
hexy.delay_ms(500); // wait 500mS
// kill all servos
for(int i=0; i<32; i++){
hexy.changeServo(i,-1);
}
// center servos 0,1,2,3
hexy.changeServo(0,1500);
hexy.changeServo(1,1500);
hexy.changeServo(2,1500);
hexy.changeServo(3,1500);
hexy.delay_ms(100); // wait 100mS
while(true){
// get a ping from the ultrasonic sensor in CM
//Serial.print("CM: ");
//Serial.println(hexy.ping());
//hexy.delay_ms(200); // wait 200mS
if(Serial.available()) { //process input from the USB
char inChar = (char)Serial.read();
hexy.processChar(inChar);
}
if(Serial1.available()){ //process input from the board serial (i.e. bluetooth)
char inChar = (char)Serial1.read();
hexy.processChar(inChar);
}
}
}
Note the last line!
This doesn't (a segment since program is too large to post)
if(Serial.available()) { //process input from the USB
inChar = (char)Serial.read();
if(inChar!='A') hexy.processChar(inChar);
else{
if(inChar=='A'){
Serial.flush();
autonomous=true;
legstart();
hexy.delay_ms(5000); //5 second to put it on the floor
}
}
}
if(Serial1.available()){ //process input from the board serial (i.e. bluetooth)
inChar = (char)Serial1.read();
if(inChar!='A') hexy.processChar(inChar);
The last line is flagged with the error:
Arduino: 1.8.0 (Windows 10), Board: "ArcBotics Servotor32"
E:\mastersketchbook\hexymove\hexydemo\hexydemo.ino: In function 'void loop()':
hexydemo:333: error: 'class Servotor32' has no member named 'processChar'
if(inChar!='A') hexy.processChar(inChar);
^
hexydemo:345: error: 'class Servotor32' has no member named 'processChar'
if(inChar!='A') hexy.processChar(inChar);
^
Multiple libraries were found for "Servotor32.h"
Used: C:\Users\william massano\AppData\Local\Arduino15\packages\ArcBotics Boards\hardware\avr\1.6.9\libraries\Servotor32
Not used: C:\Users\william massano\Documents\Arduino\libraries\Servotor32_Default
exit status 1
'class Servotor32' has no member named 'processChar'This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Any thoughts??
I may have solved the problem. Apparently, when the arcbotics software installed it used an older version of the servotor. I manually copied to the "Arduino15" folder the latest version. It seems to be working. I'll see if there are any other problems.