Talking about dupterm, the code i pasted above is working on ESP8266.
I am not sure why dupterm seems to be behaving differently on ESP32. Any dupterm command with Index value different to 0 results in an error:
ValueError: invalid dupterm index
Search found 2 matches
- Fri Nov 26, 2021 8:30 pm
- Forum: General Discussion and Questions
- Topic: PS/2 Keyboard as STDIN
- Replies: 2
- Views: 1548
- Fri Nov 26, 2021 1:24 pm
- Forum: General Discussion and Questions
- Topic: PS/2 Keyboard as STDIN
- Replies: 2
- Views: 1548
PS/2 Keyboard as STDIN
I created a simple script to read scan codes from PS/2 Keyboard, like this: from machine import UART import os import sys import time os.dupterm(None, 1) keyCodes = { 139: 'Q', 207: 'W', 194: 'E', 199: 'R', 134: 'T', 203: 'Y', 203: 'U', 161: 'I', 226: 'O', 231: 'P', 142: 'A', 205: 'S', 145: 'D', 213...