I couldn't find a nice pinout image for the Fubarino SD like I did for the previous 2 boards. If you know of one please leave a comment below.
This board has a silk-screen with the tilde symbol (~) next to some of the pins. I believe these are your options if you are using the Servo library.
The board is programmed using the MPIDE. It's a fork of the Arduino IDE meaning that you can use the Arduino libraries (and code) for this. That makes PWM extremely simple. Here's a servo example:
#include <Servo.h>
//Variable for a Servo object
Servo hobby_servo;
// variable to store the servo position
int pos = 0;
void setup()
{
// attaches the servo on pin 7 to the servo object
hobby_servo.attach(7);
// tell servo to go to center position
hobby_servo.write(90);
delay(15);
}
void loop()
{
// tell servo to go to 135 degrees
hobby_servo.write(135);
// waits 15ms for the servo to reach the position
delay(15);
//Do nothing for 2 seconds
delay(2000);
// tell servo to go to 90 degrees
hobby_servo.write(90);
// waits 15ms for the servo to reach the position
delay(15);
//Do nothing for 2 seconds
delay(2000);
}
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.