Flyduino-A_12_Servo_Controller_SKU_DFR0136_-DFRobot

Introduction

This is probably the smallest Arduino controller speically designed for controlling servos. It features a 12 standard servo control capbility with an Xbee socket which can be used in model helicopters or UAVs via the Xbee link. The feather weight (7.5g) makes it an ideal controller for application with a limited payload. The built in regulator allows the input voltage to vary from 3.5-8V which fits most power supplies without any modification.

Note: A FTDI Basic breakout is required to upload the program (@3.3V)

Warning: The controller is working under 3.3V, please do not program it with a 5V FTDI breakout, it will damage the module permanently.

Specification

Board Overview

Pin Diagram for DFlyduino

NOTE: Pin "RX" and pin "TX" are on the left side, FTDI interface

Tutorial

Sample Code

#include <MegaServo.h>
#define NBR_SERVOS 12  // the number of servos, up to 48 for Mega, 12 for other boards
#define FIRST_SERVO_PIN 2

MegaServo Servos[NBR_SERVOS] ; // max servos is 48 for mega, 12 for other boards

int pos = 0;      // variable to store the servo position
int potPin = 0;   // connect a pot to this pin.

void setup()
{
  for( int i =0; i < NBR_SERVOS; i++)
    Servos[i].attach( FIRST_SERVO_PIN +i, 800, 2200);
}
void loop()
{
  pos = analogRead(potPin);   // read a value from 0 to 1023
  for( int i =0; i <NBR_SERVOS; i++)
    Servos[i].write( map(pos, 0,1023,0,180));
  delay(15);
}

Expected Results

It can be used as a standard mini Arduino board and can control up to 12 servos.For more information, check the Arduino library.

More Documents

FAQ

For any questions, advice or cool ideas to share, please visit the DFRobot Forum.