I am having difficulties with using the Adafruit library with the BANNED board. The example code that Adafruit have provided should work, but there are errors for days, mainly with a wire1 variable from Wire.h (which is not the library from Adafruit, but is still used in the example code). I am using the Adafruit 16 channel 12 bit PWM driver, because I will ultimately need to use more than 10 servo motors.
Also, with just using a pin on the BANNED Board, the code (without using the PWM driver) should make the servo turn from 0 - 180 degrees, but it only turns slightly over 90 degrees. The code that I used is:
#include <Wire.h>
#include <Servo.h>
int servoPin = 9;
Servo myServo;
void setup()
{
myServo.attach(servoPin);
}
void loop()
{
myServo.write(0);
delay(1000);
myServo.write(180);
delay(1000);
}
Are there some compatibility issues between the Adafruit library and the BANNED Board or perhaps something else?
BANNED Board and Adafruit PWM driver using Arduino 1.5.3
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 5
- Joined: Wed Apr 30, 2014 2:51 pm
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: BANNED Board and Adafruit PWM driver using Arduino 1.5.
1.5.3 is still beta code. As far as I know, the wire library is still not ready for prime-time.
What model servo are you using?Also, with just using a pin on the BANNED Board, the code (without using the PWM driver) should make the servo turn from 0 - 180 degrees, but it only turns slightly over 90 degrees.
-
- Posts: 5
- Joined: Wed Apr 30, 2014 2:51 pm
Re: BANNED Board and Adafruit PWM driver using Arduino 1.5.
Just to do some prototyping, I used a FS90 (torque is 1.3kg/cm), but ultimately I will have to use something a bit bigger, like the DS3118 (torque 18kg/cm).
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: BANNED Board and Adafruit PWM driver using Arduino 1.5.
Who makes that? We had a batch of the Tower Pro MG90S that behaved similarly & had to send them back.I used a FS90
-
- Posts: 5
- Joined: Wed Apr 30, 2014 2:51 pm
Re: BANNED Board and Adafruit PWM driver using Arduino 1.5.
FS90 is made by FiTec
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: BANNED Board and Adafruit PWM driver using Arduino 1.5.
Not familiar with that brand. The standard library assumes "standard" servo pulse timing. But not all servos respond the same. You can try using the WriteMicroseconds function to see if you can extend the range that way.
http://arduino.cc/en/Reference/ServoWriteMicroseconds
http://arduino.cc/en/Reference/ServoWriteMicroseconds
-
- Posts: 5
- Joined: Wed Apr 30, 2014 2:51 pm
Re: BANNED Board and Adafruit PWM driver using Arduino 1.5.
Thanks. Will try it out
-
- Posts: 5
- Joined: Wed Apr 30, 2014 2:51 pm
Re: BANNED Board and Adafruit PWM driver using Arduino 1.5.
Yip, the software is choppy. Thanks for the help
Please be positive and constructive with your questions and comments.