Adafruit #570 in Inc 5000 & #11 in manufacturing - fastest-growing private companies in America - INC 5000 - Read more!
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 10: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?

Thanks,
~Eric
FunkyELF
 
Posts: 4
Joined: Thu Jan 03, 2013 10:15 am

Re: Why the busy wait with LCD+Keypad Kit

by adafruit on Thu Jan 03, 2013 11:10 am

there is no interrupt capability in this shield, its very simple!
User avatar
adafruit
 
Posts: 11663
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc