The first of the many Arduino skills i will have to learn. I now understand how to control an potentiometer and an servo motor. The things that i still have to learn are: How to control an lcd, how to control an tilt sensor, how to make it so that your lcd has a high score and timer on it and much more. Here is the code i am using to controll the servo via potentiometer #include <Servo.h>Servo myServo;int const potPin = A0;int potVal;int angle;void setup(){ myServo.attach(9); Serial.begin(9600);}void loop(){ potVal = analogRead(potPin); Serial.print(“potVal: “); Serial.print(potVal); angle = map(potVal, 0, 1023, 0, 179); myServo.write(angle); delay(15);} image is getting cropped incorectly
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.