How to increase Inject sampling rate?


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.



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

1 Like


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!



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.