Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 18:03 29 Apr 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Credit card sized keyboard

Author Message
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3845
Posted: 01:01pm 18 Jun 2021
Copy link to clipboard 
Print this post

Hey folks,

This kept going by in my Facebook feed so I figured what the hell and bought a couple:



https://docs.m5stack.com/en/unit/cardkb

I then adopted a "monkey don't have a clue, monkey guess" approach (my first use of I2C) and it was easy to get working on the PicoMite:


Option Base 0

Dim addr%, byte%

SetPin GP0, I2C0SDA
SetPin GP1, I2C0SCL
I2C Open 100, 1000
addr% = &h5F
Do
 I2C Read addr%, 0, 1, byte%
 If byte% = 0 Then
   ' nothing
 ElseIf byte% > 31 And byte% < 128 Then
   Print Chr$(byte%);
 Else
   Print "[" Hex$(byte%, 2) "]";
 EndIf
 Pause 100
Loop


... though I wouldn't like to type on those naked tactile buttons for long.

Best wishes,

Tom
Edited 2021-06-19 00:05 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 02:56pm 18 Jun 2021
Copy link to clipboard 
Print this post

Interesting. Made me wonder why there isn't any ordinary keyboard with an I2C interface. I searched, and couldn't find one.

I assume the 4 lower left buttons are arrow keys--how are they translated?

~
Edited 2021-06-19 00:57 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3845
Posted: 03:12pm 18 Jun 2021
Copy link to clipboard 
Print this post

  lizby said  I assume the 4 lower left buttons are arrow keys--how are they translated?


If you follow the URL there is a table showing the byte values for each key / sym / shift / fn combination.

As far as I can tell:

- it has no auto-repeat, i.e. if you want multiple A's you have to keep pressing [A]

- it doesn't detect simultaneous key presses. Pressing a modifier key [Sym/Shift/Fn] puts the keyboard into that mode (indicated by a coloured LED) so that the next key press produces the modified byte. If you press a modifier key twice quickly then it locks that mode in place for all subsequent key presses until a modifier key is pressed again.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Davo99
Guru

Joined: 03/06/2019
Location: Australia
Posts: 1577
Posted: 03:22pm 18 Jun 2021
Copy link to clipboard 
Print this post

First thing came to mind when I read the title of the thread was the Production Keyboard I have been looking at.  I thought how the hell is anyone going to play one  small as a credit card???  These things are like a toy as it is!



Seeing it's the other sort of keyboard, I wish there was something like this that could Plug into my cameras.  Would be so much better than having to arrow around the letter display and clicking and then going to the next letter to title images  and add information.
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024