# How to increase Inject sampling rate?

**URL:** https://discourse.nodered.org/t/how-to-increase-inject-sampling-rate/4134
**Category:** General
**Created:** [20 October 2018 02:51 UTC](https://discourse.nodered.org/t/how-to-increase-inject-sampling-rate/4134 "2018-10-20T02:51:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![HighDesert](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/highdesert/32/20996_2.png) [@HighDesert](https://discourse.nodered.org/u/HighDesert)
#### Post date: [20 October 2018 02:51 UTC](https://discourse.nodered.org/t/how-to-increase-inject-sampling-rate/4134/1 "2018-10-20T02:51:40Z")

</div>

Please forgive my newbie query, but I am reading a pulse/heart rate through an MCP3008 using the Inject node. I need to sample at faster than once every second interval, the minimum lower limit, but at about every 0.1 second in order to calculate the heart rate. Is there a way to modify the Inject node to sample faster than at one second intervals? Or, should I simply fall back to using arduino to do A/D conversion and read the result as a serial input.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [20 October 2018 06:20 UTC](https://discourse.nodered.org/t/how-to-increase-inject-sampling-rate/4134/2 "2018-10-20T06:20:50Z")

</div>

I am not certain about this and I am not at my pc, but have you tried entering 0.1 seconds?

---

<div class="post-metadata">

### Author: ![HighDesert](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/highdesert/32/20996_2.png) [@HighDesert](https://discourse.nodered.org/u/HighDesert)
#### Post date: [20 October 2018 07:29 UTC](https://discourse.nodered.org/t/how-to-increase-inject-sampling-rate/4134/3 "2018-10-20T07:29:03Z")

</div>

At first blush, and I do mean blush, you are correct. I went back and found I must have erred in my typing when I overtyped the 1 second lower limit. Thanks!

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [20 October 2018 08:17 UTC](https://discourse.nodered.org/t/how-to-increase-inject-sampling-rate/4134/4 "2018-10-20T08:17:24Z")

</div>

Just be aware that node-red is not real time. It is single threaded so can only do one thing at a time. If it were busy doing stuff that took significant fractions of a second or more then your 1/10 second tick may well be delayed. Dependent on what hardware you are running on and what else the system is doing that could potentially even be several seconds delay.
