Keypad 4 Button Key Module Switch Keyboard For UNO MEGA2560 Breadboard Geekcreit for Arduino - products that work with o

214 р.
  • Категория: Arduino
  • Производитель: Banggood

Подробнее

Описание и характеристики

Description:Can be inserted directly into uno mega2560, Ideal for linking up to yourUNO Mini Nano Mega2560 Breadboard etc, or others MCU ( AVR STM32 ARM PIC AT89C51 STC MSP430 STM8 FPGA CPLD etc.)4-button Common Cathode key moduleGND K1 K2 K3 K4 4 PIN OUT 2.54mmSize: 12.7MM x 33MM.Circuit schematics:Package includes:1 x Keyboarduno/mega2560 Code//******************************************************///*_4key_uartThis example code is in the public domain.*/// Define key pinint K1 = 13;int K2 = 12;int K3 = 11;int K4 = 10;// variables will change:int buttonState = 0; // variable for reading the pushbutton status// the setup routine runs once when you press reset:void setup() {// initialize the keys pin as an input.pinMode(K1, INPUT);pinMode(K2, INPUT);pinMode(K3, INPUT);pinMode(K4, INPUT);//Activate key pin internal pull-up resistorsdigitalWrite(K1, HIGH);digitalWrite(K2, HIGH);digitalWrite(K3, HIGH);digitalWrite(K4, HIGH);// initialize serial communications at 9600 bps:Serial.begin(9600);}// the loop routine runs over and over again forever:void loop() {buttonState = digitalRead(K1);if(!buttonState)Serial.print(k1 n );do{buttonState = digitalRead(K1);}while(!buttonState);//Wait button releasebuttonState = digitalRead(K2);if(!buttonState)Serial.print(k2 n );do{buttonState = digitalRead(K2);}while(!buttonState);//Wait button releasebuttonState = digitalRead(K3);if(!buttonState)Serial.print(k3 n );do{buttonState = digitalRead(K3);}while(!buttonState);//Wait button releasebutton

Отзывы

Мы рекомендуем ознакомиться с отзывами о "Keypad 4 Button Key Module Switch Keyboard For UNO MEGA2560 Breadboard Geekcreit for Arduino - products that work with o" перед тем как сделать заказ. После постарайтесь написать комментарий к товару. Нам важно знать ваше мнение.

Написать отзыв

Обновлено: 09.08.2020

Похожие товары

Популярные товары:

Выберите ваш город: [ X ]