<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.linksprite.com/index.php?action=history&amp;feed=atom&amp;title=LinkSprite_Playgound%3AButton_Module</id>
	<title>LinkSprite Playgound:Button Module - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.linksprite.com/index.php?action=history&amp;feed=atom&amp;title=LinkSprite_Playgound%3AButton_Module"/>
	<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=LinkSprite_Playgound:Button_Module&amp;action=history"/>
	<updated>2026-09-10T22:35:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=LinkSprite_Playgound:Button_Module&amp;diff=439&amp;oldid=prev</id>
		<title>Jingfeng: Created page with &quot;&lt;syntaxhighlight lang=&quot;c&quot;&gt; /*   Button   Turns on and off a T010111 LED Module connected to O0 (digital    pin 11), when pressing a T000180 pushbutton attached to I0 (analog p...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=LinkSprite_Playgound:Button_Module&amp;diff=439&amp;oldid=prev"/>
		<updated>2012-11-24T00:55:03Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt; /*   Button   Turns on and off a T010111 LED Module connected to O0 (digital    pin 11), when pressing a T000180 pushbutton attached to I0 (analog p...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
  Button&lt;br /&gt;
&lt;br /&gt;
 Turns on and off a T010111 LED Module connected to O0 (digital  &lt;br /&gt;
 pin 11), when pressing a T000180 pushbutton attached to I0 (analog pin 0). &lt;br /&gt;
&lt;br /&gt;
 created 2005&lt;br /&gt;
 by DojoDave &amp;lt;http://www.0j0.org&amp;gt;&lt;br /&gt;
 modified 17 Jun 2009&lt;br /&gt;
 by Tom Igoe&lt;br /&gt;
 modified 7 dec 2010&lt;br /&gt;
 by Davide Gomba&lt;br /&gt;
&lt;br /&gt;
 This example code is in the public domain.&lt;br /&gt;
&lt;br /&gt;
 based on  http://www.arduino.cc/en/Tutorial/Button&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 #define O0 11&lt;br /&gt;
 #define O1 10&lt;br /&gt;
 #define O2 9&lt;br /&gt;
 #define O3 6&lt;br /&gt;
 #define O4 5&lt;br /&gt;
 #define O5 3&lt;br /&gt;
 #define I0 A0&lt;br /&gt;
 #define I1 A1&lt;br /&gt;
 #define I2 A2&lt;br /&gt;
 #define I3 A3&lt;br /&gt;
 #define I4 A4&lt;br /&gt;
 #define I5 A5&lt;br /&gt;
&lt;br /&gt;
// constants won't change. They're used here to &lt;br /&gt;
// set pin numbers:&lt;br /&gt;
const int buttonPin = I0;     // the number of the pushbutton pin&lt;br /&gt;
const int ledPin =  O0;      // the number of the LED pin&lt;br /&gt;
&lt;br /&gt;
// variables will change:&lt;br /&gt;
int buttonState = 0;         // variable for reading the pushbutton status&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  // initialize the LED pin as an output:&lt;br /&gt;
  pinMode(ledPin, OUTPUT);      &lt;br /&gt;
  // initialize the pushbutton pin as an input:&lt;br /&gt;
  pinMode(buttonPin, INPUT);     &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop(){&lt;br /&gt;
  // read the state of the pushbutton value:&lt;br /&gt;
  buttonState = digitalRead(buttonPin);&lt;br /&gt;
&lt;br /&gt;
  // check if the pushbutton is pressed.&lt;br /&gt;
  // if it is, the buttonState is HIGH:&lt;br /&gt;
  if (buttonState == HIGH) {     &lt;br /&gt;
    // turn LED on:    &lt;br /&gt;
    digitalWrite(ledPin, HIGH);  &lt;br /&gt;
  } &lt;br /&gt;
  else {&lt;br /&gt;
    // turn LED off:&lt;br /&gt;
    digitalWrite(ledPin, LOW); &lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jingfeng</name></author>
		
	</entry>
</feed>