Video summary

ARDUINO TUTORIAL SERIES MENGGUNAKAN TINKERCAD: DIGITAL INPUT - PUSH BUTTON

Main summary

Key takeaways

Educational

Summary

The video demonstrates how to read a push button as a digital input in an Arduino simulation using Tinkercad. The Arduino reads the button’s state as either HIGH (1) or LOW (0) and uses it to control an LED.

Circuit setup

  • Add an Arduino Uno, an LED, a resistor, and a push button in Tinkercad.
  • Connect the LED’s negative leg through a resistor to GND.
  • Connect the LED’s positive leg to digital pin 12.
  • Connect one side of the push button to digital pin 11 and the other side to GND.
  • Use the Arduino’s internal pull-up resistor. With this setup, the button reads HIGH when released and LOW when pressed.

Coding and behavior

The presenter switches from block-based coding to the text editor and writes an Arduino sketch in C++:

  1. Declare variables for the button state, LED pin (12), and button pin (11).
  2. In setup():
    • Set the LED pin as OUTPUT.
    • Set the button pin to INPUT_PULLUP to enable the Arduino’s internal pull-up resistor.
  3. In loop():
    • Read the button with digitalRead() and store the result in the button-state variable.
    • If the state is LOW, set the LED pin to HIGH to turn the LED on.
    • Otherwise, set the LED pin to LOW to turn the LED off.

Because the input uses INPUT_PULLUP, the logic is inverted from what beginners might expect: released = HIGH (1) and pressed = LOW (0). The LED therefore lights while the button is pressed.

The presenter also notes that C++ is case-sensitive, so variable names must use the same capitalization wherever they appear.

Checking the input with the Serial Monitor

To verify the readings, the presenter adds Serial.begin(9600) in setup() and prints the button-state variable using a serial command. The Serial Monitor shows 1 when the button is released and 0 when it is pressed, matching the circuit’s behavior.

Speakers or sources featured

  • A single, unnamed narrator/instructor.
  • No other speakers or external sources are featured.

Rate this summary

Your feedback will help improve summaries.

Improve this summary

Reprocess with a stronger model when the summary feels incomplete or inaccurate.

Pro

Translate summary in another language

Pro

Ask questions to this video

Chat for follow-up questions, clarifications, and source-backed answers.

Coming soon

Share this summary

Original video