Tactile Push Button – 7mm

(6 customer reviews)

$0.99

173 in stock

Description

Tactile buttons are great way to add interactive elements to all sorts of projects. The pins fit directly into a breadboard.

Tactile Push Button Code


/* SETUP

Button         Arduino
S       -      D2
        -      5V
-       -      GND
*/
 
// set pin numbers
const int buttonPin = 2;    // the number of the pushbutton pin
const int ledPin =  13;   // the number of the LED pin

// changing variables
int buttonState = 0;    // variable for reading the pushbutton status

void setup() {
  pinMode(ledPin, OUTPUT);    // initialize the LED pin as an output
  pinMode(buttonPin, INPUT);    // initialize the pushbutton pin as an input
}

void loop() {
  buttonState = digitalRead(buttonPin);   // read the state of the pushbutton value
  
  if (buttonState == HIGH) {    // if button is pressed, the buttonState is HIGH
    digitalWrite(ledPin, HIGH);   // turn LED on
  } else {
    digitalWrite(ledPin, LOW);    // turn LED off
  }
}

 

  1. Qimzlj

    order cabergoline 0.5mg without prescription – premarin cheap buy alesse pills

  2. Blgfff

    гѓ—гѓ¬гѓ‰гѓ‹гѓі еЂ‹дєєијёе…Ґ гЃЉгЃ™гЃ™г‚Ѓ – гѓ—гѓ¬гѓ‰гѓ‹гѓі еЂ‹дєєијёе…Ґ гЃЉгЃ™гЃ™г‚Ѓ アジスロマイシン и–¬е±ЂгЃ§иІ·гЃ€г‚‹

  3. Gmnyrq

    г‚·гѓ«гѓ‡гѓЉгѓ•г‚Јгѓ«гЃЇи–¬е±ЂгЃ§иІ·гЃ€г‚‹пјџ – г‚їгѓЂгѓ©гѓ•г‚Јгѓ«йЂљиІ©гЃЉгЃ™гЃ™г‚Ѓ г‚·г‚ўгѓЄг‚№ гЃ©гЃ“гЃ§иІ·гЃ€г‚‹

  4. Weakde

    гѓ—гѓ¬гѓ‰гѓ‹гѓі гЃ®иіје…Ґ – ドキシサイクリン жµ·е¤–йЂљиІ© アキュテイン гЃ®иіје…Ґ

  5. Cjozqg

    eriacta regret – eriacta cheer forzest row

  6. Kpmruy

    valif pills blue – order sinemet online cheap order sinemet 20mg for sale

Add a review

Your email address will not be published. Required fields are marked *