muKey
A downloadable tool for Windows
Powered by Python 3.10.5, pynput, pystray, tkinter (Tk interface) and pySerial
Code (Python script, procedural) by Kyuchumimo
"muKey: A customizable 8-key keyboard.
Virtually compatible with any microcontroller. Just program your microcontroller, plug and play."
Tested on the following devices:
• Arduino Uno
This project uses real electronic components to make this project work. The materials are as follows:
Any microcontroller that can communicate to your computer via SERIAL/TTL/UART protocol, that has up to 10 digital inputs and can provide a string containing an 8-bit (0-255) value with or without prefix of the digital inputs . |
Up to 8 digital transducer with pull-up resistor configuration (internally or externally) |
Breadboard |
DuPont cables |
CONTROLS
DIGITAL TRANSDUCER (DIGITAL INPUT 2) | Custom key |
DIGITAL TRANSDUCER (DIGITAL INPUT 3) | Custom key |
DIGITAL TRANSDUCER (DIGITAL INPUT 4) | Custom key |
DIGITAL TRANSDUCER (DIGITAL INPUT 5) | Custom key |
DIGITAL TRANSDUCER (DIGITAL INPUT 6) | Custom key |
DIGITAL TRANSDUCER (DIGITAL INPUT 7) | Custom key |
DIGITAL TRANSDUCER (DIGITAL INPUT 8) | Custom key |
DIGITAL TRANSDUCER (DIGITAL INPUT 9) | Custom key |
Code for run on any Arduino compatible board:
void setup() {
Serial.begin(9600);
for (int i = 2; i < 10; i++) {
pinMode(i, INPUT_PULLUP);
}
}
void loop() {
int pinState = 0;
for (int i = 2; i < 10; i++) {
pinState |= (digitalRead(i) << i-2);
}
Serial.println(pinState);
delay(50);
}
Code for run on any MicroPython compatible board (save as main.py):
from machine import Pin
import utime
pins = [Pin(pin_num, Pin.IN, Pin.PULL_UP) for pin_num in range(2, 10)]
while True:
hex_val = 0
for i, pin in enumerate(pins):
hex_val |= (pin.value() << i)
print(hex_val)
utime.sleep_ms(50)
TROUBLESHOOTING
Q: Why nothing happens when I run the software even before I have connected and loaded the code to the microcontroller?
A: This software is running in the background. An icon in the system tray of your operating system should be found, either visible or hidden, where you can configure or close the software.
Q: Why does the software appear twice in the task manager?
A: This software is multithreaded. One thread controls the system tray icon and windows, while the other thread controls the serial communication and the virtual keyboard.
Status | Released |
Category | Tool |
Platforms | Windows |
Author | Kyuchumimo |
Tags | arduino, electronics |
Download
Click download now to get access to the following files:
Leave a comment
Log in with itch.io to leave a comment.