|
|
| UnitCardKB2 (const uint8_t addr=DEFAULT_ADDRESS) |
| |
| virtual bool | begin () override |
| |
| virtual void | update (const bool force=false) override |
| |
| virtual char | getchar () const override |
| | Gets the character if input.
|
| |
| uint8_t | available () const |
| | Number of available characters (0 or 1)
|
| |
| void | discard () |
| | Discard current character.
|
| |
|
|
config_t | config () |
| | Gets the configuration.
|
| |
|
void | config (const config_t &cfg) |
| | Set the configuration.
|
| |
|
| uint8_t | firmwareVersion () const |
| | Gets the firmware version.
|
| |
| bool | readFirmwareVersion (uint8_t &ver) |
| | Read the firmware version.
|
| |
|
| UnitKeyboard (const uint8_t addr=DEFAULT_ADDRESS) |
| |
| virtual uint8_t | released () const |
| | Gets the released key character code if updated.
|
| |
Card-size 42 key QWERTY keyboard — I2C mode (SKU:U215)
CardKB2 supports I2C and UART communication via GROVE port, selectable on the device:
- Fn+Sym+1: I2C mode (factory default) — returns ASCII per keypress
- Fn+Sym+2: UART mode (115200-8N1) — use UnitCardKB2UART for this mode
The selected mode is saved and persists across power cycles.
In I2C mode, the firmware returns ASCII on key press (not release) and auto-repeats after 300ms hold at 50ms intervals. Use getchar() after updated() to retrieve the pressed character.
- Note
- Sym key operates as a toggle (press once to activate, press again to deactivate). Blue LED indicates Sym mode is active.
-
Fn+D/Z/X/C arrow keys are not available in I2C/UART mode.
-
Unlike CardKB/FacesQWERTY, CardKB2 does not support software mode switching via readMode()/writeMode().
- Warning
- After switching communication mode (Fn+Sym+1/2), press the RST button on CardKB2 to reset modifier state. This will be fixed in a future firmware update.