Arduino Nano Light Sensor with OLED Display and LED Indicator
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit involves an Arduino Nano microcontroller interfacing with an OLED display, a photocell (LDR), an LED, and resistors. The Arduino Nano reads the light intensity from the photocell and controls the LED and OLED display accordingly.
Component List
Arduino Nano
- Description: A small, complete, and breadboard-friendly board based on the ATmega328P.
- Pins: D1/TX, D0/RX, RESET, GND, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11/MOSI, D12/MISO, VIN, 5V, A7, A6, A5, A4, A3, A2, A1, A0, AREF, 3V3, D13/SCK
Photocell (LDR)
- Description: A light-dependent resistor that changes its resistance based on the light intensity.
- Pins: pin 0, pin 1
Resistor (10k Ohms)
- Description: A resistor with a resistance of 10k Ohms.
- Pins: pin1, pin2
LED: Two Pin (white)
- Description: A white LED with two pins.
- Pins: cathode, anode
Resistor (10 Ohms)
- Description: A resistor with a resistance of 10 Ohms.
- Pins: pin1, pin2
OLED Display (128x32)
- Description: A 128x32 pixel OLED display.
- Pins: SDA, SCL, VCC, GND
Wiring Details
Arduino Nano
GND is connected to:
- GND of the OLED Display
- pin1 of the 10k Ohm Resistor
- cathode of the LED
5V is connected to:
- VCC of the OLED Display
- pin 1 of the Photocell (LDR)
A5 is connected to:
- SCL of the OLED Display
A4 is connected to:
- SDA of the OLED Display
A6 is connected to:
- pin 0 of the Photocell (LDR)
- pin2 of the 10k Ohm Resistor
3V3 is connected to:
- pin2 of the 10 Ohm Resistor
Photocell (LDR)
pin 0 is connected to:
- A6 of the Arduino Nano
- pin2 of the 10k Ohm Resistor
pin 1 is connected to:
- 5V of the Arduino Nano
Resistor (10k Ohms)
pin1 is connected to:
- GND of the Arduino Nano
- GND of the OLED Display
pin2 is connected to:
- pin 0 of the Photocell (LDR)
- A6 of the Arduino Nano
LED: Two Pin (white)
cathode is connected to:
- GND of the Arduino Nano
anode is connected to:
- pin1 of the 10 Ohm Resistor
Resistor (10 Ohms)
pin1 is connected to:
- anode of the LED
pin2 is connected to:
- 3V3 of the Arduino Nano
OLED Display (128x32)
GND is connected to:
- GND of the Arduino Nano
- pin1 of the 10k Ohm Resistor
VCC is connected to:
- 5V of the Arduino Nano
- pin 1 of the Photocell (LDR)
SCL is connected to:
- A5 of the Arduino Nano
SDA is connected to:
- A4 of the Arduino Nano
Documented Code
Arduino Nano Code (sketch.ino)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Additional Documentation (documentation.txt)
This documentation provides a comprehensive overview of the circuit, including a summary, detailed component list, wiring details, and the code used in the microcontroller.