# Attaching Interrupt with timeout

**URL:** <https://community.particle.io/t/attaching-interrupt-with-timeout/6373>\
**Category:** Firmware\
**Created:** [August 14, 2014, 12:57am UTC](https://community.particle.io/t/attaching-interrupt-with-timeout/6373 "2014-08-14T00:57:21Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![scsc\_tech](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@scsc\_tech](https://community.particle.io/u/scsc_tech)\
**Post date:** [August 20, 2014, 10:40pm UTC](https://community.particle.io/t/attaching-interrupt-with-timeout/6373/2 "2014-08-20T22:40:35Z")

</div>

the interrupt function should only fire once on activation of the interrupt pin. The rest of your code should continue running in the `loop`

```
void loop() {
      all your other code
}

```

take a look at this code, it has a lot of interrupts and other code intermingling

> **[Stopwatch for Pinewood Derby](https://community.particle.io/t/stopwatch-for-pinewood-derby/3486/16)**
>
> Ok here’s some code that kind of works… lol. I think there may be an issue with the noInterrupts() / interrupts() functions. Or the way I’m implementing things… The first results seem good, but then the more you run it the more it flakes a bit. ...

---

_[View the full topic](https://community.particle.io/t/attaching-interrupt-with-timeout/6373)._
