Tactile Push Button – 7mm

(15 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. Uyjavv

    buy lipitor 10mg for sale buy atorvastatin without a prescription atorvastatin 20mg ca

  2. Wnzbba

    order cipro 1000mg for sale – order keflex sale augmentin price

  3. Aqvfho

    oral ciprofloxacin – buy sulfamethoxazole sale augmentin 625mg ca

  4. Rcllpc

    order ciplox 500 mg generic – order doryx oral erythromycin

  5. Syskaf

    purchase metronidazole pills – zithromax brand zithromax brand

  6. Eifjch

    ivermectin 3mg over the counter – order amoxiclav pills tetracycline 500mg canada

  7. Rehqwz

    ivermectin generic – brand axetil sumycin 500mg sale

  8. Xpahlb

    order valtrex 1000mg – purchase nemasole for sale cost zovirax

  9. Jispqr

    ampicillin order online brand ampicillin amoxicillin drug

  10. Jyefsc

    order flagyl 400mg pill – cost flagyl 200mg buy azithromycin generic

  11. Ziouhl

    order furosemide 100mg for sale – furosemide brand buy generic captopril 25 mg

  12. Hhtcgt

    glucophage buy online – lincomycin over the counter lincomycin buy online

  13. Nxysxw

    buy retrovir 300mg online – brand rulide 150 mg order allopurinol generic

  14. Xbwqex

    clozaril generic – brand accupril 10 mg famotidine 40mg without prescription

  15. Zgvcgw

    order seroquel – sertraline 100mg drug buy generic eskalith for sale

Add a review

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