Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * 29.01.2019
- * Written by: Gabby Shimoni
- * Description:
- * This program read the value of a potentiometer connected to analog pin A0
- * and print the value to the serial monitor
- */
- #define potPin A0
- int potValue = 0;
- void setup() {
- Serial.begin(9600);
- }
- void loop() {
- potValue = analogRead(potPin);
- Serial.print("Pot value = ");
- Serial.println(potValue);
- delay(200);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement