Education

Education

Education

Servo Motor

Robo Explorers

In our first task we need to start the servo motor to make the ship walk on the waves.

View the video to learn about how a servo motor works and how we connect it to the brain of Blue Elixir Board. Also we will look into how the code is synced with the servo motor and Arduino.

Here are the code snippets referring to the servo motor.

#include <Servo.h>
//WE INCLUDE THE SERVO LIBRARY MADE BY ARDUINO
Servo myservo;

int pos =0; 

void setup() {
  Serial.begin(9600);
  myservo.attach(9); // THE SERVO MOTOR IS CONNECTED TO THE D9 PIN OF ARDUINO

}

void loop() {

  myservo.write(180);//SERVO MOTOR MOVES TO THE 180 DEGREE ANGLE
  delay(1000); // Delay of 1 seconds between measurements
  myservo.write(90);//SERVO MOTOR MOVES TO THE 90 DEGREE ANGLE
  delay(1000);

}

Here are the code snippets referring to the servo motor.

Learn from a Professional

Book a Class

Socials

info.jumplabs@gmail.com

Call Us

+4550142069

+919560372931

Damgade 82, 6400 Sønderborg

© Jumplabs Inc. 2023

Reach out to Us

Socials

info.jumplabs@gmail.com

Call Us

+4550142069

+919560372931

Damgade 82, 6400 Sønderborg

© Jumplabs Inc. 2023

Reach out to Us