Keypade & Touchpad

Produtos visualizados

Tutoriais BOXELECTRONICA

Não existe um feed RSS disponível

1x4 Key Matrix Membrane Switch Control Panel Slim Keyboard Keypad Ver maior

Teclado Menbrana Matrix Fino 1x4

BE15000072

Novo produto

3,94 € com IVA

Adicionar à Lista de desejos

Mais informação

  • Pad Size: 104 x 24 x 0.8mm
  • Cable Length: 96mm (include connector)
  • Weight: 6g
  • Connector: Dupont 9 pins, 0.1" (2.54mm) Pitch
  • Mount Style: Self-Adherence 
  • Max. Circuit Rating: 35VDC, 100mA
  • Insulation Spec.: 100M Ohm, 100V
  • Dielectric Withstand: 250VRms (60Hz, 1min)
  • Contact Bounce: <=5ms
  • Life Expectancy: 1 million closures
  • Operation Temperature: -20 to +40 °C

 

Code:

// constants won't change. They're used here to
// set pin numbers:
const int buttonPin[] = {9,10,11,12}; // the number of the pushbutton pins
const int ledPin = 13; // the number of the LED pin

// variables will change:
int buttonState = 0; // variable for reading the pushbutton status

void setup() {
// initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
// initialize the Serial Monitor @ 9600
Serial.begin(9600);
// initialize the keypad pin(s) as an input:
for(int x=0; x<2; x++)
{
pinMode(buttonPin[x], INPUT_PULLUP);
}
}

void loop(){
// read the state of the keypad value:
for(int x=0; x<2; x++)
{
//signifying the state of which the button is in by reading the appropriate pin #
buttonState = digitalRead(buttonPin[x]);

// check if the pushbutton on the keypad is pressed.
// if it is, the buttonState is LOW:
if (buttonState == LOW && buttonPin[x] == 9) {
// turn LED off:
Serial.print("OFF * ");
// digitalWrite(ledPin, LOW);
}
if (buttonState == LOW && buttonPin[x] == 10) {
// turn LED off:
Serial.print("ON *");
//digitalWrite(ledPin, LOW);
}
}
}

Acessórios

Clientes que compraram este produto também compraram: