Close

Fubarino SD

A project log for PWM examples with multiple architectures

This is the cheat sheet for the Embedded Hardware Workshop

mike-szczysMike Szczys 11/05/2014 at 22:460 Comments

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