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/

Why the busy wait with LCD+Keypad Kit

by FunkyELF on Thu Jan 03, 2013 11:28 am

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?

Posts: 4
Joined: Thu Jan 03, 2013 11:15 am

Re: Why the busy wait with LCD+Keypad Kit

by adafruit on Thu Jan 03, 2013 12:10 pm

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

Posts: 11903
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc