Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an Arduino UNO microcontroller, a resistor, a photocell (LDR), and a 0.96" OLED display. The circuit is designed to read light intensity using the photocell and display the data on the OLED screen. The Arduino UNO serves as the central controller, interfacing with the other components.
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
Resistor
- Description: A passive electrical component that implements electrical resistance as a circuit element.
- Pins: pin1, pin2
- Properties:
- Resistance: 15000 Ohms
Photocell (LDR)
- Description: A light-dependent resistor that changes its resistance based on the light intensity.
- Pins: pin 0, pin 1
0.96" OLED
- Description: A small OLED display used for visual output.
- Pins: GND, VDD, SCK, SDA
Wiring Details
Arduino UNO
- 5V: Connected to VDD of the 0.96" OLED and pin 1 of the Photocell (LDR).
- GND: Connected to GND of the 0.96" OLED and pin1 of the Resistor.
- A0: Connected to pin 0 of the Photocell (LDR) and pin2 of the Resistor.
- A4: Connected to SCK of the 0.96" OLED.
- A5: Connected to SDA of the 0.96" OLED.
Resistor
- pin1: Connected to GND of the Arduino UNO.
- pin2: Connected to pin 0 of the Photocell (LDR) and A0 of the Arduino UNO.
Photocell (LDR)
- pin 0: Connected to pin2 of the Resistor and A0 of the Arduino UNO.
- pin 1: Connected to VDD of the 0.96" OLED and 5V of the Arduino UNO.
0.96" OLED
- GND: Connected to GND of the Arduino UNO.
- VDD: Connected to pin 1 of the Photocell (LDR) and 5V of the Arduino UNO.
- SCK: Connected to A4 of the Arduino UNO.
- SDA: Connected to A5 of the Arduino UNO.
Code
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, and the loop() function contains the main code that runs repeatedly. You can add your specific logic to read the photocell and display the data on the OLED screen within these functions.
