Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an Arduino Nano, a rocker switch, a 9V battery, an IR sensor, and a piezo buzzer. The circuit is designed to power the Arduino Nano using a 9V battery through a rocker switch, and it interfaces with an IR sensor and a piezo buzzer.
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
Rocker Switch
- Description: A simple on/off switch.
- Pins: 1, 2
9V Battery
- Description: A standard 9V battery used to power the circuit.
- Pins: +, -
IR Sensor
- Description: An infrared sensor used to detect objects.
- Pins: out, gnd, vcc
Piezo Buzzer
- Description: A small speaker that produces sound.
- Pins: pin 1, pin 2
Wiring Details
Arduino Nano
- VIN: Connected to pin 2 of the Rocker Switch
- GND: Connected to the negative terminal of the 9V Battery, pin 2 of the Piezo Buzzer, and the ground pin of the IR Sensor
- D5: Connected to the output pin of the IR Sensor
- 5V: Connected to the VCC pin of the IR Sensor
- D4: Connected to pin 1 of the Piezo Buzzer
Rocker Switch
- Pin 1: Connected to the positive terminal of the 9V Battery
- Pin 2: Connected to the VIN pin of the Arduino Nano
9V Battery
- Positive Terminal (+): Connected to pin 1 of the Rocker Switch
- Negative Terminal (-): Connected to the GND pin of the Arduino Nano
IR Sensor
- out: Connected to pin D5 of the Arduino Nano
- gnd: Connected to the GND pin of the Arduino Nano
- vcc: Connected to the 5V pin of the Arduino Nano
Piezo Buzzer
- Pin 1: Connected to pin D4 of the Arduino Nano
- Pin 2: Connected to the GND pin of the Arduino Nano
Documented Code
Arduino Nano 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 Nano. The setup function is where you initialize your components, and the loop function is where you place the code that needs to run continuously.
Additional Documentation
This section is reserved for any additional documentation or notes related to the code or circuit.
