I was looking at the LCD+Keypad Kits available here.
They look pretty sweet and I like that they come with example Python code.
However, I looked at the code and noticed that it is basically doing a busy wait querying each button to see if it is pressed.
I'm not a system programmer, but I'd have to think that there must be a better way to see button presses.
Some sort of event, or signaling, or callback mechanism?
Would something like that be possible or would it require more logic on the board?
Keyboards have over 100 buttons, how do they do it and what prevents this 5 button board from doing it?
Thanks,
~Eric
Why the busy wait with LCD+Keypad Kit
Moderators: adafruit_support_bill, adafruit
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: Why the busy wait with LCD+Keypad Kit
there is no interrupt capability in this shield, its very simple!
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/