4 ms·
It is a bit slow. It takes 4 ms to scan the matrix once right now. With some optimizations, it may be faster.
by kfihihc 6y ago
It is a bit slow. It takes 4 ms to scan the matrix once right now. With some optimizations, it may be faster.
- sk0g 6y agoWould 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?)
- kfihihc 6y agoThe best usb keyboard should have 1ms latency due to USB HID interrupt interval. 4 ms is not that bad.
- sk0g 6y agoYeah, read it as 4ms per row at first. Should be fine for general use, and rather impressive as is :)
- JoeSmithson 6y agoHow would 4ms be noticeably laggy?
- sk0g 6y agoI read it first as 4ms per row, but yeah 4ms per scan wouldn't be too bad. There is of course additional time taken for communication etc, which might take another 4-10ms, which could make it almost a frame behind. Not terrible still.
- turbinerneiter 6y agoIt's a microcontroller. It has maybe 512k of storage and 128k of memory. The Numpy package probably is ~100Mb The controller is running CircuitPython which is a fork of MicroPython - a tiny re-implementation Python for microcontrollers.
- sk0g 6y agoValid point! Might still be able to get a speed up if you can write and import your own C code though.