<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=Arduino%3A_Button</id>
	<title>Arduino: Button - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=Arduino%3A_Button"/>
	<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=Arduino:_Button&amp;action=history"/>
	<updated>2026-04-19T23:51:12Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.4</generator>
	<entry>
		<id>https://onnocenter.or.id/wiki/index.php?title=Arduino:_Button&amp;diff=45226&amp;oldid=prev</id>
		<title>Onnowpurbo: New page: Sumber: https://www.arduino.cc/en/Tutorial/Button   ==Hardware==  * Arduino or Genuino Board * Momentary button or Switch * 10K ohm resistor * hook-up wires * breadboard    ==Rangkaian==  ...</title>
		<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=Arduino:_Button&amp;diff=45226&amp;oldid=prev"/>
		<updated>2015-12-04T03:01:36Z</updated>

		<summary type="html">&lt;p&gt;New page: Sumber: https://www.arduino.cc/en/Tutorial/Button   ==Hardware==  * Arduino or Genuino Board * Momentary button or Switch * 10K ohm resistor * hook-up wires * breadboard    ==Rangkaian==  ...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Sumber: https://www.arduino.cc/en/Tutorial/Button&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Hardware==&lt;br /&gt;
&lt;br /&gt;
* Arduino or Genuino Board&lt;br /&gt;
* Momentary button or Switch&lt;br /&gt;
* 10K ohm resistor&lt;br /&gt;
* hook-up wires&lt;br /&gt;
* breadboard &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Rangkaian==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Button.png|center|200px|thumb]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Button schem.png|center|200px|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   Button&lt;br /&gt;
 &lt;br /&gt;
  Turns on and off a light emitting diode(LED) connected to digital&lt;br /&gt;
  pin 13, when pressing a pushbutton attached to pin 2.&lt;br /&gt;
  &lt;br /&gt;
 &lt;br /&gt;
  The circuit:&lt;br /&gt;
  * LED attached from pin 13 to ground&lt;br /&gt;
  * pushbutton attached to pin 2 from +5V&lt;br /&gt;
  * 10K resistor attached to pin 2 from ground&lt;br /&gt;
 &lt;br /&gt;
  * Note: on most Arduinos there is already an LED on the board&lt;br /&gt;
  attached to pin 13.&lt;br /&gt;
  &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 30 Aug 2011&lt;br /&gt;
  by Tom Igoe&lt;br /&gt;
 &lt;br /&gt;
  This example code is in the public domain.&lt;br /&gt;
 &lt;br /&gt;
  http://www.arduino.cc/en/Tutorial/Button&lt;br /&gt;
  */&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 = 2;     // the number of the pushbutton pin&lt;br /&gt;
 const int ledPin =  13;      // 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;
   } 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;
&lt;br /&gt;
==Referensi==&lt;br /&gt;
&lt;br /&gt;
* https://www.arduino.cc/en/Tutorial/Button&lt;/div&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
</feed>