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/
Locked
FunkyELF
 
Posts: 16
Joined: Thu Jan 03, 2013 11:15 am

Why the busy wait with LCD+Keypad Kit

Post by FunkyELF »

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

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Why the busy wait with LCD+Keypad Kit

Post by adafruit »

there is no interrupt capability in this shield, its very simple!

Locked
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/

Return to “Adafruit Raspberry Pi® accessories”