# Asynchronous send

**URL:** <https://community.particle.io/t/asynchronous-send/10237>\
**Category:** General\
**Created:** [February 25, 2015, 12:49pm UTC](https://community.particle.io/t/asynchronous-send/10237 "2015-02-25T12:49:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Awake](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@Awake](https://community.particle.io/u/Awake)\
**Post date:** [February 25, 2015, 12:49pm UTC](https://community.particle.io/t/asynchronous-send/10237/1 "2015-02-25T12:49:07Z")

</div>

I have project where I need to count incoming pulses, from several per second to 1 per minute.  
I figure that I will use an interrupt whenever a pulse comes in.  
Every 5 minutes, it would then upload the pulse count to a server.  
Is there a way to have the Spark upload the data while still continuing to count, so no pulses are missed during the upload time?

---

<div class="post-metadata">

**Author:** ![TheHawk1337](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/thehawk1337/32/3424_2.png) [@TheHawk1337](https://community.particle.io/u/TheHawk1337)\
**Post date:** [February 25, 2015, 12:53pm UTC](https://community.particle.io/t/asynchronous-send/10237/2 "2015-02-25T12:53:43Z")

</div>

Interrupts should override any loops that are running but I don’t know if they have higher priority than the spark functions.

Edit : could not find any additional information in the docs. Perhaps @Dave can help (or somebody else but dave comes to mind 😉 )

---

<div class="post-metadata">

**Author:** ![peekay123](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/peekay123/32/810_2.png) [@peekay123](https://community.particle.io/u/peekay123)\
**Post date:** [February 25, 2015, 1:09pm UTC](https://community.particle.io/t/asynchronous-send/10237/3 "2015-02-25T13:09:52Z")

</div>

@Awake, user interrupts are not higher level than “core” interrupts But if you keep your ISR code short then you won’t have any problems 😄

---

<div class="post-metadata">

**Author:** ![mdma](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/mdma/32/1924_2.png) [@mdma](https://community.particle.io/u/mdma)\
**Post date:** [February 27, 2015, 9:57am UTC](https://community.particle.io/t/asynchronous-send/10237/4 "2015-02-27T09:57:33Z")

</div>

Yep, interrupts should work fine! 🙂 Just declare your counter `volatile` and increment the counter from the interrupt. Then in the main loop, send the counter value every few minutes.
