(SKU:RB-02S032) Digital Push Button

From ALSRobot-Wki
Jump to: navigation, search
Anniuhuang.jpg

Contents

Product overview

Press type large button module is necessary Arduino learning introductory digital switch input module, and can be realized by programming glow lamp control, voice control, LCD display key choice function, etc. Golden key caps, beautiful and practical, comfortable, through 3 p sensors extension cables with the Arduino board connection, convenient and quick.

specification

  1. Working voltage:5v DC
  2. Control signal, press the button to output low level signals
  3. Plane dimension:23×29.4
  4. weight:3g

Method of use

Pin definition

  • S:Signal input
  • +:(VCC)
  • -:(GND)

Connection here

Anh.jpg
S ports from the I/O port of the controller. + and - received power of + 5 v &gnd respectively.

Application of routine

Big button module and LED a small light access Starduino controller in accordance with the program, press the big button module status of LED small lights.

sample code

const int buttonPin =A0;     
const int ledPin =  13;     

int buttonState = 0;         

void setup() {
  
  pinMode(ledPin, OUTPUT);      
 
  pinMode(buttonPin, INPUT);     
}

void loop(){
  
  buttonState = digitalRead(buttonPin);

  
  if (buttonState == LOW) {     
     
    digitalWrite(ledPin, HIGH);  
  } 
  else {
   
    digitalWrite(ledPin, LOW); 
  }
} 

Application effect

Download the program to the controller, when press the big button, the button module can see LED light controller board, loosen the controller board after the LED out.

Products related to recommend

Buy address:[1]

Personal tools
Namespaces

Variants
Actions
Navigation
Tools