Arduino Nano-Based Pushbutton-Controlled Seven Segment Display
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit consists of an Arduino Nano microcontroller, a pushbutton, and a seven-segment display. The Arduino Nano is used to control the seven-segment display and read the state of the pushbutton. The pushbutton is connected to a digital input pin on the Arduino Nano, and the seven-segment display is connected to multiple digital output pins on the Arduino Nano.
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
Pushbutton
- Description: A simple pushbutton with four pins.
- Pins: Pin 2, Pin 1, Pin 3, Pin 4
Seven Segment Display (Wokwi Compatible)
- Description: A seven-segment display used to show numerical digits.
- Pins: G, F, COM.2, B, A, E, D, COM.1, C, DP
Wiring Details
Arduino Nano
- D13/SCK is connected to COM.1 of the Seven Segment Display.
- D9 is connected to Pin 4 of the Pushbutton.
- D8 is connected to G of the Seven Segment Display.
- D7 is connected to F of the Seven Segment Display.
- D6 is connected to E of the Seven Segment Display.
- D5 is connected to D of the Seven Segment Display.
- D4 is connected to C of the Seven Segment Display.
- D3 is connected to B of the Seven Segment Display.
- D2 is connected to A of the Seven Segment Display.
- GND is connected to Pin 2 of the Pushbutton.
Pushbutton
- Pin 4 is connected to D9 of the Arduino Nano.
- Pin 2 is connected to GND of the Arduino Nano.
Seven Segment Display (Wokwi Compatible)
- COM.1 is connected to D13/SCK of the Arduino Nano.
- G is connected to D8 of the Arduino Nano.
- F is connected to D7 of the Arduino Nano.
- E is connected to D6 of the Arduino Nano.
- D is connected to D5 of the Arduino Nano.
- C is connected to D4 of the Arduino Nano.
- B is connected to D3 of the Arduino Nano.
- A is connected to D2 of the Arduino Nano.
Code Documentation
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 settings, and the loop() function is where you place the main code that runs repeatedly. Currently, both functions are empty and need to be filled with the appropriate logic to control the seven-segment display and read the pushbutton state.