Trybotics Logo

Blynk Arduino Servo

DESCRIPTION

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.

Description:

For this you will need:

-Arduino Uno

-Servo motor

-LED light

-220ohm resistor

-breadboard

-smartphone

Description:

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

Description:

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.

Description:

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

Description:

#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);

}

}

}

Description:

for use with the blynk app, consult this page.

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

Description:


YOU MIGHT ALSO LIKE