Gokino
Learn Arduino with AI
#044 分Lesson4_PushbuttonPullUp.ino

ArduinoボタンとINPUT_PULLUP入門! 誤動作を1行で解決 | レッスン #4

Arduino押しボタンの誤点滅を1行で解消! フローティングピン、内蔵INPUT_PULLUP、Active-LOW反転ロジックをChromeとGokino AIで学ぶ。

学習ポイント

  • インストール不要でChromeからGokino.devを開く
  • 使用する部品6点 (ボタン用外付け抵抗ゼロ)
  • フローティングピン・INPUT_PULLUP・反転ロジック解説
  • Gokino AI /wiring で対話型回路図を確認

使用するハードウェアキット

  • Arduino Uno R3: ATmega328P 5V brain board with built-in 20k-50kΩ pull-up resistors + USB-B data cable
  • Solderless Breadboard: Half-size 400-point grid: 5-hole rows A-E / F-J, center gap, and blue (-) GND rail
  • 4-Pin Tactile Pushbutton: 6x6mm momentary switch straddling center gap (no polarity; uses built-in INPUT_PULLUP)
  • 5mm Red External LED: One-way 2.0V bulb (15mA safe): long (+) leg Anode, short flat-edge (-) leg Cathode
  • 220Ω Resistor: 1/4W Red-Red-Brown-Gold bands (either way works): protects LED at safe 13.6mA
  • Male-to-Male Jumper Wires: Blue Pin 2 wire, orange Pin 12 wire, and 3 black GND wires (no 5V wire needed!)

10秒ハードウェアチャレンジ

Your pushbutton circuit works cleanly! Try flipping LOW to HIGH on gokino.dev for a fridge-door light, and subscribe for Lesson Five!