I am an IT professional and just received my Mini Arduino board. I have been trying to interface two servos to the mini on a breadboard but have been having problems. I first setup the basic 'blink' program as a starting point, this works fine. I then tried inputting the first basic portion of the servo addition. By adding the line: #include <Servo.h>
But this results in the following errors:
C:\DOCUME~1\kdadmin\LOCALS~1\Temp\build52507.tmp\core.a(wiring.c.o): In function `delay':
C:\Arduino\lib\targets\arduino\wiring.c:50: multiple definition of `delay'
lib\targets\libraries\wiring\WApplet.o:/Users/h/wiring/wiring/core/WApplet.c:65: first defined here
/cygdrive/c/Arduino/tools/avr/bin/../lib/gcc/avr/4.0.2/../../../../avr/bin/ld: Warning: size of symbol `delay' changed from 50 in lib\targets\libraries\wiring\WApplet.o to 68 in C:\DOCUME~1\kdadmin\LOCALS~1\Temp\build52507.tmp\core.a(wiring.c.o)
C:\DOCUME~1\kdadmin\LOCALS~1\Temp\build52507.tmp\core.a(wiring.c.o): In function `delayMicroseconds':
C:\Arduino\lib\targets\arduino\wiring.c:70: multiple definition of `delayMicroseconds'
lib\targets\libraries\wiring\WApplet.o:/Users/h/wiring/wiring/core/WApplet.c:86: first defined here
/cygdrive/c/Arduino/tools/avr/bin/../lib/gcc/avr/4.0.2/../../../../avr/bin/ld: Warning: size of symbol `delayMicroseconds' changed from 24 in lib\targets\libraries\wiring\WApplet.o to 26 in C:\DOCUME~1\kdadmin\LOCALS~1\Temp\build52507.tmp\core.a(wiring.c.o)
Please help. I have a headache. Are my answers different because I am using the mini?
OK, it appears that I have fixed the initial problem. The arduino default download contains the wiring libraries pre installed. The wiring libraries already have a library called servo.h After removing the wiring libraries I am no longer receving error messages when I compile.
This compiles properly, but when the runs and it tries to send the “Ready” to the serial port the result comes back garbled as “H???åÿ” which looks very interesting, but its not what I am looking for Both the code and the application are set to 19200. Any suggestions?
Thanks for the reply. I tried adding a full 5 second delay before the command is sent, the response is now "ÿ±?ö" which is different than the “H???åÿ”, but still not "Hello". I must be overlooking something simple.
if ( Serial.available()) {
char ch = Serial.read();
switch(ch) {
case '0'...'9':
v = v * 10 + ch - '0';
break;
case 's':
servo1.write(v);
v = 0;
break;
case 'w':
servo2.write(v);
v = 0;
break;
case 'd':
servo2.detach();
break;
case 'a':
servo2.attach(15);
break;
}
}
It certainly looks like a speed mismatch. Are you using the "Serial Monitor" of the arduino environment to talk to it? If so, did you notice that the monitor and the download speed have separate defaults? If not, you might try using it till you successfully see your ready message...