-->

M5StickC CardKB HAT

SKU:U077

Regular price $4.59
Standard Shipping Estimated Delivery Time: 7-20 days
Description

CardKB HAT is an implementation of a full-featured QWERTY keyboard tailored as a HAT for the M5StickC. Consider that you want to make some cool stuff that require interaction through typing on a keyboard. But M5StickC itself just has 2 buttons. So, here comes the flexible and yet powerful “CardKB HAT” to solve the issue.

The CardKB HAT also offers support for several button combinations (Shift+Key, Fn+Key) adding virtually many different keys. This comes with an RGB LED to indicate the keyboard state. IIC address is 0x5F.

Button combination description:

  • Single button is pressed,once pressed button the led flashing blue.keyboard will output the first (normal) key value in its lower case. E.g. if "Q" is pressed, keyboard will output "q"(lower case).

  • Shift+Key, After pressing the Shift key, led flashing red,if a letter button is pressed, it'll output the letter in its upper case or the second value. E.g. if "Shift" is pressed once, then "Q" is pressed, the keyboard will output "Q". If "Shift" is double clicked, then the keyboard will lock this function and all the letter keys pressed will give output in CAPITALS.

  • Fn+Key(custom function key combination), led flashing green,keyboard will output the third key value, which you can customize based on the requirement.

  • Double-click Shift or fn to lock Shift(red always on) or Fn(green always on) and output the second value or third value multiple times.

Product Features

  • Full-function keyboard with multi-key combination support
  • IIC Address : 0X5F(I2C)
  • Product Size:84.6mm x 54.2mm x 6.5mm

Include

  • 1x CardKB HAT

Application

  • Keyboard peripheral
Learn

PinMap

ATMega328 ISPDownload interface Pin foot definition

Example

Arduino IDE

To get the code, please click here

#include <M5StickC.h>
#include <Wire.h>

#define CARDKB_ADDR 0x5F

void setup()
{
  M5.begin();
  Wire.begin(0, 26);
  M5.Lcd.setRotation(3);
  M5.Lcd.fillScreen(BLACK);
  M5.Lcd.setCursor(0, 0, 2 );
  M5.Lcd.setTextColor(YELLOW);

  M5.Lcd.println("IIC Address: 0x5F\n");
  M5.Lcd.println(">>");
}
void loop()
{
  Wire.requestFrom(CARDKB_ADDR, 1);
  while(Wire.available())
  {
    char c = Wire.read(); // receive a byte as characterif
    if (c != 0)
    {
      M5.Lcd.printf("%c", c);
      Serial.println(c, HEX);
      Serial.println(char(c));
    }
  }
  // delay(10);
}

 

Customer Reviews

Based on 1 review
100%
(1)
0%
(0)
0%
(0)
0%
(0)
0%
(0)
C
C.K.
I good enhancement for M5StickC

The CardKB HAT allows new applications with the M5StickC but you need sharp fingers to operate the keys. Are there better keys for easier operation?