Why the busy wait with LCD+Keypad Kit

Talk about Adafruit Raspberry Pi® accessories!

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

Postby FunkyELF » 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

Postby adafruit » Thu Jan 03, 2013 11:10 am

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


Return to Adafruit Raspberry Pi® accessories

Who is online

Users browsing this forum: No registered users and 3 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [102]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[108]
 
Wireless[14]
Cables[60]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[69]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]