Arduino Potentiometer Simple Code

From wikiluntti

Introduction

Potentiometer

Code 1

int potVal = 0; 

void setup() {
  Serial.begin(9600);
}

void loop(){
  potVal = analogRead(A0); 
  Serial.println( potVal );
}


Code 2