Quantcast
Channel: gpio – Adafruit Industries – Makers, hackers, artists, designers and engineers!
Viewing all articles
Browse latest Browse all 54

Code GPIO interrupts using WiringPi #piday #raspberrypi @Raspberry_Pi

$
0
0

NewImage

From the Raspberry Pi Hobbyist‘s Ted B. Hale:

An interrupt is a signal to the computer to stop what it is doing and do something else. These are used extensively by the operating system, but an application can use them as well. If you have a GPIO input that needs to be responded to, you could poll the GPIO pin in a loop waiting for it to change, but this can be unreliable for very brief state changes. It is also wasteful of the CPU. The better way is to assign an interrupt that will be activated when the GPIO pin changes state.

Full tutorial


998Each Friday is PiDay here at Adafruit! Be sure to check out our posts, tutorials and new Raspberry Pi related products. Adafruit has the largest and best selection of Raspberry Pi accessories and all the code & tutorials to get you up and running in no time!


Viewing all articles
Browse latest Browse all 54

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>