Mar 202013
 
How to use interrupts with Python on the Raspberry Pi and RPi.GPIO - part 2

Interrupts are an efficient way for a program to be able to respond immediately to a specific event. In the previous article I explained the basics of using interrupts in RPi.GPIO and gave an example of a simple “wait for an event” interrupt program. In this second article I will introduce “threaded callback” which opens up a lot of new possibilities. Threaded callback – what the heck is that? I know it sounds complicated. And it probably is complicated in the C code it’s written in, but we’re Pythonites and we don’t have to go […more…]