Aim:
To connect a sensor (button or LDR) to Arduino and observe input readings using Serial Monitor.
Requirements:
-
Computer with internet
-
Tinkercad account
-
Virtual components:
-
Arduino Uno
-
Breadboard
-
Push Button or LDR
-
Resistor (10kΩ for LDR or pull-down for button)
-
Wires
-
Steps:
-
Go to Tinkercad → Create a New Circuit.
-
Drag in Arduino Uno and Breadboard.
-
Connect either:
-
Push Button to a Digital Pin (with a pull-down resistor), or
-
LDR to an Analog Pin (with a 10kΩ resistor).
-
-
Use Code Blocks or Text Code to read the sensor value.
-
Open the Serial Monitor and observe what happens when you press the button or change light over the LDR.