# LMIC-node Scheduling uplink

**URL:** <https://www.thethingsnetwork.org/forum/t/lmic-node-scheduling-uplink/59766>\
**Category:** LMIC\
**Created:** [November 6, 2022, 6:55am UTC](https://www.thethingsnetwork.org/forum/t/lmic-node-scheduling-uplink/59766 "2022-11-06T06:55:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![grizzlyalleyne](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/grizzlyalleyne/32/35697_2.png) [@grizzlyalleyne](https://www.thethingsnetwork.org/forum/u/grizzlyalleyne)\
**Post date:** [November 6, 2022, 6:55am UTC](https://www.thethingsnetwork.org/forum/t/lmic-node-scheduling-uplink/59766/1 "2022-11-06T06:55:06Z")

</div>

In the example “LMIC-node” a user can schedule uplink messages to be sent in intervals. I know that this can be changed in the platformio.ini file. I have device that is sending the devices battery percentage every 10 minutes, however I would like to know if it is possible to send an uplink message outside of the scheduled interval? I have a geophone attached and would like a single uplink message to be sent when the geophone reading spikes past a certain threshold. Is this possible with the “LMIC-node” example?

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [November 6, 2022, 11:39am UTC](https://www.thethingsnetwork.org/forum/t/lmic-node-scheduling-uplink/59766/2 "2022-11-06T11:39:31Z")

</div>

Either put a check in the loop() function, best with some duration constraints so it’s not doing it every few microseconds as the loop runs, or duplicate the doWorkJob variable and the doWorkCallback and processWork functions. You can then set an appropriate interval and in the new processWork check the geophone and if it has spiked, build the payload and call scheduleUplink.

So the code is all there for your to copy.

If the geophone has an output signal to tell you it has spiked, it would be better to implement an interrupt.

---

<div class="post-metadata">

**Author:** ![grizzlyalleyne](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/grizzlyalleyne/32/35697_2.png) [@grizzlyalleyne](https://www.thethingsnetwork.org/forum/u/grizzlyalleyne)\
**Post date:** [November 7, 2022, 2:39pm UTC](https://www.thethingsnetwork.org/forum/t/lmic-node-scheduling-uplink/59766/3 "2022-11-07T14:39:57Z")

</div>

Thank you so much, that worked perfectly.

---

<div class="post-metadata">

**Author:** ![system](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/6/2/6250ea44fd2b0d6259489e1a92748df681e1f970.png) [@system](https://www.thethingsnetwork.org/forum/u/system)\
**Post date:** [November 8, 2022, 2:40pm UTC](https://www.thethingsnetwork.org/forum/t/lmic-node-scheduling-uplink/59766/4 "2022-11-08T14:40:07Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
