SHARE
TWEET

Untitled

a guest Jun 24th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <Arduino.h>
  2. #include <Servo.h>
  3.  
  4. Servo miniServo;
  5. int mini = 0;
  6.  
  7. void setup() {
  8.   Serial.begin(9600);
  9.   miniServo.attach(4);
  10. }
  11.  
  12. void loop() {
  13.   if (Serial.available() > 0)
  14.   {
  15.     Serial.println("value now is: " +mini);
  16.     Serial.println("enter number between 0-180: ");
  17.     mini = Serial.read();
  18.     delay(250);
  19.     miniServo.write(mini);
  20.   }
  21.  
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top