Tuesday, December 2, 2014

Development of FPV Quadcopter

First trial in developing quadcopter

Parts required:
  1. 4pcs of Brushless motor 1000KV
  2. 4pcs of Electronic Speed Controller (ESC) 30A
  3. Quadcopter frame (3D printer)
  4. 6045 blade propeller (6 inch)
  5. LIPO 2200 mA 20C battery
  6. Arduino UNO
  7. Potentiometer
  8. Jumper Wire
This is just trial to lift an empty frame, without any loading.

Arduino's Coding
// Need the Servo library
#include <Servo.h>
// This is our motor.

Servo myMotor;
//int val = 50;
// This is the final output
// written to the motor.
String incomingString;
int val,oldval;

// Set everything up
void setup()
{
   Serial.begin(9600);

// Put the motor to Arduino pin #9
myMotor.attach(9);
Serial.println("initializing");

// Required for I/O from Serial monitor
int val = analogRead(0);
int oldval = val;

// Print a startup message
}

void loop()
{
   val = analogRead(0);
   if (val != oldval)
 {
   oldval = val;
   int laju = map(val,0,1023,0,180);
   myMotor.write(laju);
   oldval = val;
   Serial.println(laju);
   delay(500);
  }