gabbyshimoni icon

ReadPotValue

gabbyshimoni | PRO | 01/29/19 05:27:19 PM UTC | 0 ⭐ | 407 👁️ | Never ⏰ | []
C++ |

390 B

|

None

|

0 👍

/

0 👎

/*
 * 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);
}

Comments