Introduction: Blynk Arduino Servo

Picture of Blynk Arduino Servo

For this lab we will be creating a Servo motor that can be controlled with a smart phone. The app needed for this is called bkynk and you will need to download it to your smart phone and the library for your aduino.

http://docs.blynk.cc/#hardware-set-ups-arduino-ove...

That is the website where you can get the library.

Also once the servo goes past a certain position, an LED light will turn on.

Step 1: Materials

Picture of Materials

For this you will need:

-Arduino Uno

-Servo motor

-LED light

-220ohm resistor

-breadboard

-smartphone

Step 2: Connect Power

Picture of Connect Power

First, you will need to connect the power to the board. Also, ground the board too.

Step 3: Connect the Servo Motor

Picture of Connect the Servo Motor

Secondly, connect the power and ground on the motor to the power and ground on the breadboard.

Then, connect the yellow wire to pin 11, pulse width modulation.

Step 4: Connect the Light

Picture of Connect the Light

Third, connect the power and ground of LED to breadboard. and connect the resistor to the anode to the pin 7.

Step 5: Code

#define BLYNK_PRINT SwSerial

#include <softwareSerial.h>

SoftwareSerial SwSerial(10, 11); // RX, TX

#include <BlynkSimpleStream.h>

#include <servo.h>

// You should get Auth Token in the Blynk App.

// Go to the Project Settings (nut icon).

char auth[] = "645f1bbd27c4410c81a5f9d89aa75260";

Servo servo;

BLYNK_WRITE(V3)

{

servo.write(param.asInt());

}

void setup() {

// Debug console

SwSerial.begin(9600);

// Blynk will work through Serial

// Do not read or write this serial manually in your sketch

Serial.begin(9600);

Blynk.begin(Serial, auth);

servo.attach(9);

}

void loop() {

Blynk.run();

if(param.asInt() > 90)
{

digitalWrite(13, HIGH);

}

else

{

digitalWrite(13, LOW);

}

}

}

Step 6: Blynk

for use with the blynk app, consult this page.

http://docs.blynk.cc/#hardware-set-ups-arduino-over-usb-no-shield

Comments

About This Instructable

58views

1favorite

License:

More by crockettcal:Arduino Micro Servo KeypadLED Row Fade ArduinoSimple IOT Alarm
Add instructable to: