Skip to main content

Menu

Push Button Sensor Arduino Compatible

ARD2-2204
Arduino Compatible Push Button Sensor

$2.95

QTYPrice
1 $2.95

Description

This sensor allows you to control your Arduino project with the press of a button. It's perfect for whenever you need a simple input in your project.

Test Code

int Led = 13; // define LED Interface
int buttonpin = 3; // define the key switch sensor interface
int val; // define numeric variables val

void setup() {
pinMode(Led, OUTPUT); // define LED as output interface
pinMode(buttonpin, INPUT); // define the key switch sensor output interface
}

void loop() {
val = digitalRead(buttonpin); // digital interface will be assigned a value of 3 to read val

// When the key switch when the sensor detects a signal, LED flashes
if (val == HIGH) {
digitalWrite(Led, HIGH);
}
else {
digitalWrite (Led, LOW);
}
}

Features

  • Push button switch suitable for Arduino projects
  • Digital switch output (0 & 1)

Specifications

Output

Digital switch (0 & 1)

Board Colour

Black

Material

PCB

Resources

You Might Also Like

All prices are in Australian Dollars and include GST. GST will be removed from your order if you are ordering from outside Australia.
Products may differ from pictured.
All trademarks and trade names are the properties of their respective owners. Wiltronics disclaims any proprietary interest in trademarks and trade names other than its own.

Push Button Sensor Arduino Compatible

ARD2-2204

$2.95

We use cookies to ensure you have the best experience on our site. If you continue to use this site you consent to the use of these cookies. OK

Find out more in our Privacy Policy