Spark Wizards's profile

Analog Sensors: Activity 1 "Photoresistor"

Analog Sensors: Activity 1 "Photoresistor"
The objective of this activity is to identify the ADC (Analog-Digital Converter) value when the photoresistor is at the maximum and minimum level of light exposure.

For this, the following code was written:
In this, the first step we do is define a constant to the analog pin A0, since the photoresistor is connected to it.

Then we declare maximum and minimum threshold variables, taking into account that the total resistance of the circuit is the sum of all the resistances.

They previously calculated the resistance generated by the photoresistor, a range between 1003 to 1023 was chosen.

Then with "if" conditionals it is declared when the threshold level is at the maximum or minimum.
Analog Sensors: Activity 1 "Photoresistor"
Published:

Analog Sensors: Activity 1 "Photoresistor"

Published:

Creative Fields