Text: Microcontroller
Q1. What is the resolution of the Analog to Digital Converter in your Arduino Board?
Q2. Show your calculation of converting the decimal reading of LDR into Voltage.
Q3. What happens if you swap the locations of the resistor and the LDR in the voltage divider setup?
Text
(Arduino Uno)
A0 ; 22 42; 1J= Fct 23; float ref=5 ) [local
void setup()
{
Serial.begin(9600);
}
void loop()
{
int sensorValue = analogRead(A0);
float voltage = sensorValue * (5.0 / 1023.0);
Serial.print("LDR Sensor Reading: ");
Serial.println(sensorValue);
Serial.print("Voltage from the Sensor: ");
Serial.println(voltage);
int sensorMeasurement = 679;
float voltageFromSensor = 0.32;
int sensorMeasurementFromADC2 = 1017;
int potentiometerValue = 839;
}