<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ko">
	<id>https://arduwiki.com/html/index.php?action=history&amp;feed=atom&amp;title=Switch_Module%28KY-004%29_JP</id>
	<title>Switch Module(KY-004) JP - 편집 역사</title>
	<link rel="self" type="application/atom+xml" href="https://arduwiki.com/html/index.php?action=history&amp;feed=atom&amp;title=Switch_Module%28KY-004%29_JP"/>
	<link rel="alternate" type="text/html" href="https://arduwiki.com/html/index.php?title=Switch_Module(KY-004)_JP&amp;action=history"/>
	<updated>2026-04-29T01:51:40Z</updated>
	<subtitle>이 문서의 편집 역사</subtitle>
	<generator>MediaWiki 1.40.1</generator>
	<entry>
		<id>https://arduwiki.com/html/index.php?title=Switch_Module(KY-004)_JP&amp;diff=2544&amp;oldid=prev</id>
		<title>2025년 3월 27일 (목) 10:49에 ArduWiki님의 편집</title>
		<link rel="alternate" type="text/html" href="https://arduwiki.com/html/index.php?title=Switch_Module(KY-004)_JP&amp;diff=2544&amp;oldid=prev"/>
		<updated>2025-03-27T10:49:31Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ko&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 이전 판&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2025년 3월 27일 (목) 19:49 판&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l7&quot;&gt;7번째 줄:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;7번째 줄:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;KY-004スイッチモジュールは、Arduinoボードと互換性のあるシンプルなスイッチ入力モジュールです。Arduinoボードに接続してスイッチ入力を受け取ることができます。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;KY-004スイッチモジュールは、Arduinoボードと互換性のあるシンプルなスイッチ入力モジュールです。Arduinoボードに接続してスイッチ入力を受け取ることができます。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[タクトスイッチ(Tact Switch)]]とほぼ同じ機能を持つモジュールであるため、フローティング現象、プルアップ・プルダウン抵抗など、スイッチに関する詳細な内容は[[タクトスイッチ(Tact Switch)]]の文書をご参照ください。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Tact Switch JP|&lt;/ins&gt;タクトスイッチ(Tact Switch)]]とほぼ同じ機能を持つモジュールであるため、フローティング現象、プルアップ・プルダウン抵抗など、スイッチに関する詳細な内容は[[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Tact Switch JP|&lt;/ins&gt;タクトスイッチ(Tact Switch)]]の文書をご参照ください。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &amp;#039;&amp;#039;&amp;#039;仕様&amp;#039;&amp;#039;&amp;#039; ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &amp;#039;&amp;#039;&amp;#039;仕様&amp;#039;&amp;#039;&amp;#039; ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key arduwiki:diff::1.12:old-2543:rev-2544 --&gt;
&lt;/table&gt;</summary>
		<author><name>ArduWiki</name></author>
	</entry>
	<entry>
		<id>https://arduwiki.com/html/index.php?title=Switch_Module(KY-004)_JP&amp;diff=2543&amp;oldid=prev</id>
		<title>2025년 3월 27일 (목) 10:49에 ArduWiki님의 편집</title>
		<link rel="alternate" type="text/html" href="https://arduwiki.com/html/index.php?title=Switch_Module(KY-004)_JP&amp;diff=2543&amp;oldid=prev"/>
		<updated>2025-03-27T10:49:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ko&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 이전 판&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2025년 3월 27일 (목) 19:49 판&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;1번째 줄:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;1번째 줄:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{#seo:|title=Arduinoウィキ : Arduinoスイッチモジュール(KY-004)ガイド|title_mode=append|keywords=Arduino, 情報科学, メイカー学習, パフォーマンス評価, スイッチモジュール(KY-004), Arduino作品, キャップストーン作品, Arduinoサンプルコード|description=Arduinoでスイッチモジュール(KY-004)を制御する方法（基本情報、回路、サンプルコード）を紹介します。情報科学やメイカー授業に活用できます。}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{#seo:|title=Arduinoウィキ : Arduinoスイッチモジュール(KY-004)ガイド|title_mode=append|keywords=Arduino, 情報科学, メイカー学習, パフォーマンス評価, スイッチモジュール(KY-004), Arduino作品, キャップストーン作品, Arduinoサンプルコード|description=Arduinoでスイッチモジュール(KY-004)を制御する方法（基本情報、回路、サンプルコード）を紹介します。情報科学やメイカー授業に活用できます。}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[파일:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Ky004スイッチモジュール&lt;/del&gt;.jpg|center|class=coders100]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[파일:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Ky004스위치모듈&lt;/ins&gt;.jpg|center|class=coders100]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &amp;#039;&amp;#039;&amp;#039;概要&amp;#039;&amp;#039;&amp;#039; ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &amp;#039;&amp;#039;&amp;#039;概要&amp;#039;&amp;#039;&amp;#039; ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key arduwiki:diff::1.12:old-2542:rev-2543 --&gt;
&lt;/table&gt;</summary>
		<author><name>ArduWiki</name></author>
	</entry>
	<entry>
		<id>https://arduwiki.com/html/index.php?title=Switch_Module(KY-004)_JP&amp;diff=2542&amp;oldid=prev</id>
		<title>ArduWiki: 새 문서: {{#seo:|title=Arduinoウィキ : Arduinoスイッチモジュール(KY-004)ガイド|title_mode=append|keywords=Arduino, 情報科学, メイカー学習, パフォーマンス評価, スイッチモジュール(KY-004), Arduino作品, キャップストーン作品, Arduinoサンプルコード|description=Arduinoでスイッチモジュール(KY-004)を制御する方法（基本情報、回路、サンプルコード）を紹介します。情報科学やメイカー授業に...</title>
		<link rel="alternate" type="text/html" href="https://arduwiki.com/html/index.php?title=Switch_Module(KY-004)_JP&amp;diff=2542&amp;oldid=prev"/>
		<updated>2025-03-27T10:48:08Z</updated>

		<summary type="html">&lt;p&gt;새 문서: {{#seo:|title=Arduinoウィキ : Arduinoスイッチモジュール(KY-004)ガイド|title_mode=append|keywords=Arduino, 情報科学, メイカー学習, パフォーマンス評価, スイッチモジュール(KY-004), Arduino作品, キャップストーン作品, Arduinoサンプルコード|description=Arduinoでスイッチモジュール(KY-004)を制御する方法（基本情報、回路、サンプルコード）を紹介します。情報科学やメイカー授業に...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;새 문서&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{#seo:|title=Arduinoウィキ : Arduinoスイッチモジュール(KY-004)ガイド|title_mode=append|keywords=Arduino, 情報科学, メイカー学習, パフォーマンス評価, スイッチモジュール(KY-004), Arduino作品, キャップストーン作品, Arduinoサンプルコード|description=Arduinoでスイッチモジュール(KY-004)を制御する方法（基本情報、回路、サンプルコード）を紹介します。情報科学やメイカー授業に活用できます。}}&lt;br /&gt;
&lt;br /&gt;
[[파일:Ky004スイッチモジュール.jpg|center|class=coders100]]&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;概要&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
KY-004スイッチモジュールは、Arduinoボードと互換性のあるシンプルなスイッチ入力モジュールです。Arduinoボードに接続してスイッチ入力を受け取ることができます。&lt;br /&gt;
&lt;br /&gt;
[[タクトスイッチ(Tact Switch)]]とほぼ同じ機能を持つモジュールであるため、フローティング現象、プルアップ・プルダウン抵抗など、スイッチに関する詳細な内容は[[タクトスイッチ(Tact Switch)]]の文書をご参照ください。&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;仕様&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
* 動作電圧：3.3V ～ 5V&lt;br /&gt;
* スイッチ出力レベル：LOW（0V） / HIGH（VCC）&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;活用例&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
=== 1. シリアルモニターでスイッチ入力を確認する ===&lt;br /&gt;
スイッチが押されたかどうかをシリアルモニターで確認する例です。&lt;br /&gt;
&lt;br /&gt;
==== 回路構成 ====&lt;br /&gt;
[[파일:Ky004예제1회로.jpg|center|class=coders100]]&lt;br /&gt;
&lt;br /&gt;
==== Arduinoコード ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
int switchPin = 2; // KY-004モジュールのOUTピンを2番ピンに接続&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  pinMode(switchPin, INPUT);&lt;br /&gt;
  Serial.begin(9600); // シリアル通信開始&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  int switchState = digitalRead(switchPin); // スイッチの状態を読み取る&lt;br /&gt;
  &lt;br /&gt;
  if (switchState == LOW) { // スイッチが押された時&lt;br /&gt;
    Serial.println(&amp;quot;スイッチが押されました&amp;quot;);&lt;br /&gt;
  } else { // スイッチが押されていない時&lt;br /&gt;
    Serial.println(&amp;quot;スイッチが押されていません&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  delay(100); // 100ミリ秒待機&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== 実行結果 ====&lt;br /&gt;
スイッチの状態がシリアルモニターに表示されます。&lt;br /&gt;
&lt;br /&gt;
[[파일:Ky004예제1실행결과.png|center|class=coders100]]&lt;br /&gt;
&lt;br /&gt;
=== 2. スイッチとLEDを一緒に使う ===&lt;br /&gt;
スイッチを押すとLEDが点灯し、押されていない時は消灯する例です。&lt;br /&gt;
&lt;br /&gt;
==== 回路構成 ====&lt;br /&gt;
[[파일:Ky004예제2회로.jpg|center|class=coders100]]&lt;br /&gt;
&lt;br /&gt;
==== Arduinoコード ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
int switchPin = 2; // KY-004スイッチモジュールのピン&lt;br /&gt;
int ledPin = 13; // LEDのピン&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  pinMode(switchPin, INPUT);&lt;br /&gt;
  pinMode(ledPin, OUTPUT); // LEDピンを出力に設定&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  int switchState = digitalRead(switchPin); // スイッチの状態を読み取る&lt;br /&gt;
&lt;br /&gt;
  if (switchState == LOW) { // スイッチが押されている（LOWレベル）&lt;br /&gt;
    digitalWrite(ledPin, HIGH); // LED点灯&lt;br /&gt;
  } else {&lt;br /&gt;
    digitalWrite(ledPin, LOW); // LED消灯&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== 実行結果 ====&lt;br /&gt;
スイッチを押した時だけLEDが点灯するのが確認できます。&lt;br /&gt;
&lt;br /&gt;
[[파일:Ky004예제2실행결과.jpg|center|class=coders100]]&lt;/div&gt;</summary>
		<author><name>ArduWiki</name></author>
	</entry>
</feed>