AND Gate Using Arduino Nano
The objective of this project is to demonstrate the working of an AND logic gate using an Arduino Nano and two push buttons.
Supplies
DESHBOT SHIELD
UNO NANO
INBUILD LED
INBUILD SWITCHES
Working Principle
The two buttons represent the two inputs of the AND gate:
- Button A → Input A
- Button B → Input B
- LED → Output
The Arduino reads both button states and performs the AND operation.
The LED turns ON only when A and B are both HIGH (pressed).
Logic
A AND B → LED
Truth Table
Input AInput BLED Output
0 0 OFF
0 1 OFF
1 0 OFF
1 1 ON
Conclusion
This project demonstrates how an Arduino Nano can reproduce the behavior of an AND logic gate using two push buttons and an LED. It helps explain the relationship between digital inputs, Boolean logic, and digital outputs.