top of page
Write to Servo Position Code

#include <Servo.h>  //This line calls the Servo library which allows us to make specific command

Servo myservo;  //Each servo in the code must be set up as its own object, this Servo object is named myservo

​void setup() {
myservo.attach(9);
 //Attach myservo to digital pin 9
}

void loop() {
  myservo.write(0);
//Name the servo then .write followed by the position writing to 0-180 in the ()             
  delay(1000);          
//This delay gives time for the servo to write to the position               
}

Igniting Innovation through Functional Prototyping and Physical Computing

Contact Information

odysseyboardedu.@gmail.com
Phone: (360) 303-5526
24338 Lee Road
Mount Vernon, WA 98274

Contact Us

Thanks for submitting!

© 2017 by Odyssey Board. All rights reserved.

bottom of page