Guest User

wall-e controller arduino

a guest
Jul 23rd, 2014
6,124
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <Servo.h>
  2.  
  3. Servo myservo;  // create servo object to control a servo
  4.  
  5. void setup()
  6. {
  7.   myservo.attach(9);  // attaches the servo on pin 9 to the servo object
  8.   Serial.begin(9600);
  9. }
  10.  
  11.  
  12. void loop()
  13. {
  14.   if(Serial.available()>0){
  15.     byte angel=Serial.read();
  16.     Serial.println(angel);
  17.     myservo.write(angel);
  18.   }
  19.   delay(1);
  20. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×