Live data from Hacker News

A hand-wired USB and Bluetooth keyboard powered by Python

github.com

1–10 of 29 posts

Re: A hand-wired USB and Bluetooth keyboard powered by Python

#3
post #2

This looks cool, however can someone with some electronics know-how explain to me why the connections on most, if not all the keys are crossed? They don't look like insulated wires, though I could be wrong.

Looks like they only appear to be touching in the photo but aren't really.

Re: A hand-wired USB and Bluetooth keyboard powered by Python

#4
post #2

This looks cool, however can someone with some electronics know-how explain to me why the connections on most, if not all the keys are crossed? They don't look like insulated wires, though I could be wrong.

Insulated wires that look a lot like bare metal are quite common, e.g. in electromagnet coils.

https://en.wikipedia.org/wiki/Magnet_wire

The insulation melts away where it comes in contact with hot solder, so it's very easy to work with for hand-wiring projects.

Re: A hand-wired USB and Bluetooth keyboard powered by Python

#6

Haha that's amazing. What's the latency on this though? I always assumed firmware written in python would be slow for a use case like a keyboard.

It is a bit slow. It takes 4 ms to scan the matrix once right now. With some optimizations, it may be faster.

Re: A hand-wired USB and Bluetooth keyboard powered by Python

#7
post #6

Haha that's amazing. What's the latency on this though? I always assumed firmware written in python would be slow for a use case like a keyboard.

It is a bit slow. It takes 4 ms to scan the matrix once right now. With some optimizations, it may be faster.

Would Numpy be of use? Haven't looked at the source yet, but for a keyboard, 4 ms per matrix would be noticeably laggy, especially if you add debouncing (is that even a thing in keyboards?)

Re: A hand-wired USB and Bluetooth keyboard powered by Python

#9
post #7
post #6

Earlier quoted context omitted.

It is a bit slow. It takes 4 ms to scan the matrix once right now. With some optimizations, it may be faster.

Would Numpy be of use? Haven't looked at the source yet, but for a keyboard, 4 ms per matrix would be noticeably laggy, especially if you add debouncing (is that even a thing in keyboards?)

The best usb keyboard should have 1ms latency due to USB HID interrupt interval. 4 ms is not that bad.

Re: A hand-wired USB and Bluetooth keyboard powered by Python

#10
post #7
post #6

Earlier quoted context omitted.

It is a bit slow. It takes 4 ms to scan the matrix once right now. With some optimizations, it may be faster.

Would Numpy be of use? Haven't looked at the source yet, but for a keyboard, 4 ms per matrix would be noticeably laggy, especially if you add debouncing (is that even a thing in keyboards?)

How would 4ms be noticeably laggy?
Post reply on HN