{"product_id":"key-switch-modules","title":"HS-KEY1B Key Switch Module | Digital Push Button Input - Wholesale Pack","description":"\u003c!-- OPENELAB_WHOLESALE_PACK_START --\u003e\n\u003ch2\u003eWholesale Pack Configuration\u003c\/h2\u003e\n\u003cp\u003eThis listing is supplied as wholesale packs. The displayed price applies to one complete pack, not to an individual unit. Select the Shopify option that matches the pack configuration you need.\u003c\/p\u003e\n\u003ctable\u003e\n\u003cthead\u003e\u003ctr\u003e\n\u003cth\u003eCurrent Shopify option\u003c\/th\u003e\n\u003cth\u003eWholesale specification\u003c\/th\u003e\n\u003cth\u003ePack quantity\u003c\/th\u003e\n\u003c\/tr\u003e\u003c\/thead\u003e\n\u003ctbody\u003e\u003ctr\u003e\n\u003ctd\u003eDefault Title\u003c\/td\u003e\n\u003ctd\u003e50 pcs\/Pack\u003c\/td\u003e\n\u003ctd\u003e50 units\u003c\/td\u003e\n\u003c\/tr\u003e\u003c\/tbody\u003e\n\u003c\/table\u003e\n\u003cp\u003eEach pack uses the 10% bulk discount from the aggregated individual-unit price. The compare-at price represents the total of the original individual-unit prices; the sale price represents one complete pack. Product specifications elsewhere on this page describe the individual item unless a section says otherwise.\u003c\/p\u003e\n\u003c!-- OPENELAB_WHOLESALE_PACK_END --\u003e\n\n\u003ch2\u003eHS-KEY1B Key Switch Module - Digital Push Button Input Board for Arduino and STEM Projects\u003c\/h2\u003e\n\u003cp\u003eThe HS-KEY1B Key Switch Module is a simple digital push-button input board for menu controls, mode selection, counters, games, and first Arduino lessons. It gives beginners a clean way to connect a button to a controller without building a switch circuit from loose components.\u003c\/p\u003e\n\u003cp\u003eUse it with the \u003ca href=\"https:\/\/upenelab.com\/products\/elab-nano-v3-board-ch340\"\u003eELAB Nano V3\u003c\/a\u003e, \u003ca href=\"https:\/\/upenelab.com\/products\/mb-102-breadboard-kit\"\u003eMB 102 Breadboard Kit\u003c\/a\u003e, or output modules like the \u003ca href=\"https:\/\/upenelab.com\/products\/rgb-full-color-led-light-module\"\u003eRGB Full Color LED Module\u003c\/a\u003e. For multi-key input, compare it with the 4-way key switch module already in the catalog.\u003c\/p\u003e\n\u003cp\u003eMechanical buttons need debouncing in software. Confirm whether the module output is active-high or active-low before finalizing code.\u003c\/p\u003e\n\n\u003ch2\u003eTechnical Specifications\u003c\/h2\u003e\n\u003ctable\u003e\n  \u003cthead\u003e\u003ctr\u003e\n\u003cth\u003eParameter\u003c\/th\u003e\n\u003cth\u003eValue\u003c\/th\u003e\n\u003c\/tr\u003e\u003c\/thead\u003e\n  \u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eSKU\u003c\/td\u003e\n\u003ctd\u003eHS-KEY1B\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eProduct Type\u003c\/td\u003e\n\u003ctd\u003eKey switch \/ push button module\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eOutput\u003c\/td\u003e\n\u003ctd\u003eDigital button state\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eInterface\u003c\/td\u003e\n\u003ctd\u003eSignal, VCC, GND depending on board label\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eTypical Supply\u003c\/td\u003e\n\u003ctd\u003e3.3V \/ 5V controller systems\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eHost Requirement\u003c\/td\u003e\n\u003ctd\u003eGPIO input\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eUse Cases\u003c\/td\u003e\n\u003ctd\u003eMenus, counters, start\/stop controls, games\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eSoftware Need\u003c\/td\u003e\n\u003ctd\u003eDebounce recommended\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eMounting\u003c\/td\u003e\n\u003ctd\u003ePanel or board mount\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eSignal Logic\u003c\/td\u003e\n\u003ctd\u003eVerify active level by testing\u003c\/td\u003e\n\u003c\/tr\u003e\n  \u003c\/tbody\u003e\n\u003c\/table\u003e\n\n\u003ch2\u003eBoard Layout \u0026amp; Label Guide\u003c\/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003cstrong\u003eButton\u003c\/strong\u003e - User input switch.\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eSignal Pin\u003c\/strong\u003e - Digital output to the host.\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eVCC\u003c\/strong\u003e - Positive supply if required.\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eGND\u003c\/strong\u003e - Common ground.\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eHeader\u003c\/strong\u003e - Jumper-wire connection point.\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eMounting Area\u003c\/strong\u003e - Fix the module to avoid cable strain.\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eDebounce Note\u003c\/strong\u003e - Filter rapid contact bounce in code.\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eLogic Note\u003c\/strong\u003e - Test whether pressed is HIGH or LOW.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch2\u003eApplication Scenarios\u003c\/h2\u003e\n\u003ch3\u003e1. Arduino Digital Input\u003c\/h3\u003e\n\u003cp\u003eRead the key switch digital output.\u003c\/p\u003e\n\u003cpre\u003e\u003ccode\u003econst int sensorPin = 2;\n\nvoid setup() {\n  Serial.begin(115200);\n  pinMode(sensorPin, INPUT);\n}\n\nvoid loop() {\n  Serial.println(digitalRead(sensorPin));\n  delay(100);\n}\u003c\/code\u003e\u003c\/pre\u003e\n\u003ch3\u003e2. LED Event Output\u003c\/h3\u003e\n\u003cp\u003eTurn on an LED when the module is pressed.\u003c\/p\u003e\n\u003cpre\u003e\u003ccode\u003econst int sensorPin = 2;\nconst int ledPin = 13;\n\nvoid setup() {\n  pinMode(sensorPin, INPUT);\n  pinMode(ledPin, OUTPUT);\n}\n\nvoid loop() {\n  digitalWrite(ledPin, digitalRead(sensorPin));\n}\u003c\/code\u003e\u003c\/pre\u003e\n\u003ch3\u003e3. MicroPython GPIO Monitor\u003c\/h3\u003e\n\u003cp\u003eMonitor the digital output from a Pico-style board.\u003c\/p\u003e\n\u003cpre\u003e\u003ccode\u003efrom machine import Pin\nimport time\n\nsensor = Pin(15, Pin.IN)\n\nwhile True:\n    print(sensor.value())\n    time.sleep(0.1)\u003c\/code\u003e\u003c\/pre\u003e\n\n\u003ch2\u003ePacking List\u003c\/h2\u003e\n\u003cul\u003e\n\u003cli\u003e1 x HS-KEY1B Key Switch Module\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch2\u003eFAQ\u003c\/h2\u003e\n\u003cp\u003e\u003cstrong\u003eQ: What is this used for?\u003c\/strong\u003e\u003cbr\u003eA: Digital push-button input.\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eQ: Does it output analog values?\u003c\/strong\u003e\u003cbr\u003eA: No, it outputs a digital state.\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eQ: Can I use internal pull-ups?\u003c\/strong\u003e\u003cbr\u003eA: Yes, if the wiring is active-low.\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eQ: Does it need debounce?\u003c\/strong\u003e\u003cbr\u003eA: Yes.\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eQ: Can it start a motor or relay?\u003c\/strong\u003e\u003cbr\u003eA: Yes, through controller code and a driver.\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eQ: Why does it read backward?\u003c\/strong\u003e\u003cbr\u003eA: The module logic may be active-low.\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eQ: Can it work with ESP32?\u003c\/strong\u003e\u003cbr\u003eA: Yes, if signal voltage is compatible.\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eQ: What should I test first?\u003c\/strong\u003e\u003cbr\u003eA: Pin mapping, active level, and debounce timing.\u003c\/p\u003e\n","brand":"OpenELAB","offers":[{"title":"Default Title","offer_id":44005373575366,"sku":"HS-KEY1B","price":111.56,"currency_code":"EUR","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0621\/0050\/4774\/files\/05-Additional-1_69567e29-62c9-4238-bf17-4037e09cc230.jpg?v=1770805382","url":"https:\/\/upenelab.com\/products\/key-switch-modules","provider":"OpenELAB Technology Ltd.","version":"1.0","type":"link"}