Tag: interrupts

  • ATtiny85, arduino-cli, interrupts; PIR-triggered wakeup example

    ATtiny85, arduino-cli, interrupts; PIR-triggered wakeup example

    I had a hard time getting started with ATtiny85. I ordered a few of those chips to use in a motion detector for my backyard because of its low power consumption and ability to be put into a deep sleep and woken up via an interrupt. The interrupt in this case would be a rising…

  • Use GPIO interrupts instead of sensor sampling to simplify code

    Naively, I’ve been using sensor sampling as the only way to detect changes in sensor readings. Shaking my head over here. Just sad. Sampling means periodically reading sensor value to detect changes. My period was typically around 10Hz, or 10 times every second. Not only it is wasteful in many cases, it also has a…