Tutorial by Examples

int val = 0; // variable used to store the value // coming from the sensor void setup() { Serial.begin(9600); //Begin serializer to print out value // Note: Analogue pins are // automatically set as inputs } void loop() { val = analogRead(0); // read the va...
Analog pins can be used to read voltages which is useful for battery monitoring or interfacing with analog devices. By default the AREF pin will be the same as the operating voltage of the arduino, but can be set to other values externally. If the voltage to read is larger than the input voltage, a ...

Page 1 of 1