Hardware Reference
In-Depth Information
Figure 3-4: Multimeter measurement
Listing 3-1: Potentiometer Reading Sketch—pot.ino
//Potentiometer Reading Program
const int POT=0; //Pot on analog pin 0
int val = 0; //variable to hold the analog reading from the POT
void setup()
{
Serial.begin(9600);
}
void loop()
{
val = analogRead(POT);
Serial.println(val);
delay(500);
}
Search WWH ::




Custom Search