Ermagerd. I disagree entirely. Python on the RPi is plenty fast enough for this application.joe2act wrote: Glad to see you have suggestion for lmcc. May be hobby developers like you and lmcc can cooperate with each other on the next generation RPi home alarm system?
If RPi is not fast enough in python, maybe alarm system can have an additional RPi. Then, RPi #1 polls one group sensors, and RPi#2 polls another group sensors. Maybe RPi model C can help increase python speed too.
I chose to poll the GPIO pins in this application to keep a dead simple pure-Python implementation. (Isn't this a platform for education?) If I wanted event detection with higher precision, I still wouldn't use interrupt driven IO. I'd simply change my sleep(1) statement to sleep(0.5).
With one-second polling, top reports a CPU usage of 0.3%. I will gladly trade for 0.3% of CPU usage for the convenience of shirking interrupts.
If bad guys are burglarizing my house at a rate higher than once per second, I need a sub-machine gun, not interrupt driven IO.