Surilli
Published © LGPL

Servo Motor Control using Surilli WiFi

Build your own door lock, automatic trash can, or control a robotic arm using micro servo SG90 and Surilli.

BeginnerFull instructions provided20 minutes1,289
Servo Motor Control using Surilli WiFi

Things used in this project

Hardware components

Jumper wires (generic)
Jumper wires (generic)
×3
Servos (Tower Pro MG996R)
×1
Surilli WiFi
Surilli WiFi
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Servo Motor Control using Surilli WiFi

Code

Servo_Motor

C/C++
#include <Servo.h>
Servo myservo;                   // create servo object to control a servo
                                 // twelve servo objects can be created on most boards
int pos = 0;                     // variable to store the servo position
void setup() {
 myservo.attach(4);             // attaches the servo on pin A1 to the servo object
}
void loop() {
 for (pos = 0; pos <= 180; pos += 1) 
                             // goes from 0 degrees to 180 degrees in steps of 1 degree
{ 
   myservo.write(pos);              // tell servo to go to position in variable 'pos'
   delay(15);                       // waits 15ms for the servo to reach the position
 }
 for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
   myservo.write(pos);              // tell servo to go to position in variable 'pos'
   delay(15);                       // waits 15ms for the servo to reach the position
 }
} 

Credits

Surilli

Surilli

196 projects • 62 followers
Surilli is a premiere Internet of Things centric Technology Company aimed at providing cutting edge innovative solutions.

Comments