KS0466 Keyestudio AD KEY Button Module(Black and Eco-friendly)

From Keyestudio Wiki
Revision as of 14:28, 2 September 2019 by Keyestudio (talk | contribs)
Jump to navigation Jump to search


Ks0466-1.png



Description

When we use the single-chip microcomputer, sometimes we need more then one button module.
In general, we use a digital port to connect one button module. When multiple buttons are required, multiple digital ports are required, so that we would waste the source of single-chip microcomputer IO port.
So we specially design this module. It only need an analog port of single-chip microcomputer to show the function of five button module.
To conveniently mount the module on any other devices, it comes with 4 fixing holes of 3mm diameter.


Special Note:
When the supply voltage is different, the analog value corresponding to the same button on the module is different.
When using, we can’t press the multiple buttons in the same time; if you did, analog value read by the signal pin of the module is the minimum analog value corresponding to the multiple button.


Technical Parameters

  • Working voltage: DC 3.3-5V
  • Interface: 3pin of 2.54mm pitch
  • communication port: Analog pins
  • Positioning hole diameter:3mm
  • Dimensions: 68mm*37mm*16mm
  • Weight: 13.8g
  • Environment attribute: ROHS


Wiring Diagram


thumb


Test Code

int val = 0;
void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() 
{
  // read the input on analog pin 0:
  val = analogRead(A0);
  // print out the value you read:
  Serial.println(val);
  delay(100);       
}

Test Result


Done uploading the code to control board, open the serial monitor and set the baud rate to 9600. Press different keys on the module, and the serial port monitor displays different values, as shown in the figure below:
thumb