Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Reading a potentiometer on analog pin A0
- and printing out the value
- */
- int potValue = 0;
- int potPin = A0;
- void setup(){
- Serial.begin(9600);
- }
- void loop(){
- potValue = analogRead( potPin );
- Serial.print("potValue = ");
- Serial.println(potValue);
- delay(100);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement