Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Arduino.h>
- #include <Servo.h>
- Servo miniServo;
- int mini = 0;
- void setup() {
- Serial.begin(9600);
- miniServo.attach(4);
- }
- void loop() {
- if (Serial.available() > 0)
- {
- Serial.println("value now is: " +mini);
- Serial.println("enter number between 0-180: ");
- mini = Serial.read();
- delay(250);
- miniServo.write(mini);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement