OpenSprinkler › Forums › OpenSprinkler Unified Firmware › high CPU usage with Unified Firmware on Raspberry Pi › Reply To: high CPU usage with Unified Firmware on Raspberry Pi
March 11, 2015 at 9:42 pm
#35960
kms
Participant
> One solution is to add a short sleep at the end of the loop to give the CPU some spare time.
Yes, I thought about this but, not understanding the code, was reluctant to change things in
case I accidentally started turning the solenoids on and off every 10 milliseconds or something.
So, a quick test of adding a usleep(10000) to the end of the loop (ie, 10ms delay) has reduced the CPU usage to
about 2% when idle, and the system still works, and the solenoids havent exploded 😉
Thanks.
Kim.