<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tobetobekun</author_name>
  <author_url>https://blog.hatena.ne.jp/tobetobekun/</author_url>
  <blog_title>tobetobekun’s diary</blog_title>
  <blog_url>https://tobetobekun.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>はじめに こんにちは！今回は、押すたびにLEDの点灯・消灯を切り替える「トグルスイッチ風」のプログラムに挑戦します。前回の「押してる間だけLEDが点灯」とは違い、「押す→点灯、もう一度押す→消灯」といった動作になります。 使用する部品 前回と同じ構成でOKです！ 部品名 数量 備考 Arduino Uno 1 LED（赤） 1 抵抗（330Ω） 1 LED保護用 押しボタン 1 ブレッドボード 1 ジャンパーワイヤー 数本 接続方法（内部プルアップ） Arduinoピン 接続先 内容 D2 LEDの＋端子 出力ピン GND LEDの−端子（→抵抗） GNDへ接続 D3 ボタンの片側 内部プルア…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftobetobekun.hatenablog.com%2Fentry%2F2025%2F06%2F19%2F223041&quot; title=&quot;【Arduino入門④】押すたびにLEDがON/OFF！トグルスイッチを作ってみた - tobetobekun’s diary&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/t/tobetobekun/20250618/20250618224655.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-06-19 22:30:41</published>
  <title>【Arduino入門④】押すたびにLEDがON/OFF！トグルスイッチを作ってみた</title>
  <type>rich</type>
  <url>https://tobetobekun.hatenablog.com/entry/2025/06/19/223041</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
