Hardware Reference
In-Depth Information
Serial.begin( 9600 );
void loop ()
val = analogRead(pot);
delay( 500 );
Save this code, called PotDemo . Testing
Compile and deploy the program to the board. To see analog input value, open Serial Mon-
itor. It can get it by clicking menu Tools -> Serial Monitor.
Try to change value on Potentiometer and see it on Serial Monitor. A sample output can be
seen in Figure below.
Search WWH ::

Custom Search