Circuit Documentation
Summary
This circuit consists of an Arduino UNO microcontroller, a Light Dependent Resistor (LDR) module, a red LED, and a resistor. The LDR module is used to detect light levels, and the LED is controlled based on the readings from the LDR. The resistor is used to limit the current flowing through the LED.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
Module LDR
- Description: A module containing a Light Dependent Resistor (LDR) used to measure light intensity.
- Pins: VCC, GND, DO, AO
LED: Two Pin (red)
- Description: A red LED with two pins: anode and cathode.
- Pins: cathode, anode
Resistor
- Description: A resistor with a resistance of 200 Ohms.
- Pins: pin1, pin2
- Properties:
- Resistance: 200 Ohms
Wiring Details
Arduino UNO
- 5V is connected to VCC of the Module LDR.
- GND is connected to GND of the Module LDR.
- GND is connected to pin1 of the Resistor.
- A2 is connected to AO of the Module LDR.
- D3 is connected to anode of the LED: Two Pin (red).
Module LDR
- VCC is connected to 5V of the Arduino UNO.
- GND is connected to GND of the Arduino UNO.
- AO is connected to A2 of the Arduino UNO.
LED: Two Pin (red)
- anode is connected to D3 of the Arduino UNO.
- cathode is connected to pin2 of the Resistor.
Resistor
- pin1 is connected to GND of the Arduino UNO.
- pin2 is connected to cathode of the LED: Two Pin (red).
Code Documentation
Arduino UNO Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
This code is a basic template for the Arduino UNO. The setup() function is used to initialize any settings or configurations, and the loop() function contains the main code that runs repeatedly. In this circuit, you would typically add code to read the LDR value from pin A2 and control the LED connected to pin D3 based on the light intensity.
