Any nodes using interrupts? (Pwm / frequency input

As per the title…

Any nodes using interrupts? (Pwm / frequency input?)

Ive looked but not noticed yet… Thanks in advance

… answered my own question with a new node…

uses Arduino pulseIn(pin, value)

happy XOD’ing :slight_smile:


Thank you robertspark for making the pulsein component.

I did some testing on an Uno reading various short square waves and observed the following;

  1. When milli seconds are selected then the correct values show in a watch window. However when micro seconds are selected the watch window (or serial print) shows 0.00 for duration regardless of the duration of the input pulse.

  2. The frequency of the “Done” output is ~1.66 times the the frequency of the input pulses.

It may be that this is something peculiar to the setup I am using so it would be nice if someone else can confirm.


I checked the c code

bool mSecs = getValue<input_mU002Fu>(ctx);
auto multi = 0.0;
if (mSecs == 1)
multi = 0.001;
else {
multi = 0.0;

I guess the else multi should be 1.0 and not 0.0? The block seems to display the right value with this change.

HI please help me with this issue
When I input the RC signal to the controller(using pulse in long node) and convert it to the position of the motor, the Arduino automatically reduces the speed of the motor.(even if the nod not connected)
When i cancels the input Rc signal, the motor returns to its normal speed

Please provide code you are using and explain what you mean by “cancel the input RC signal”.

My first guess would be that you are running pulse-in as often as possible, and this is bogging down the Arduino so that it not able to pulse the stepper motor as quickly, so it slows down.

You’re right, I’m looking for another way rather than (pules in )nod

its bogging down the Arduino

Why have you started 3 discussions on the same issue?

no its only the (RC library warp discussion
) and (stepper robot discussion)
and still struggling with (pulse in) problems slowing down board speed

How have you diagnosed that pulse-in is “slowing down board speed”
It’s doing what it needs to do and nothing else - reading the interrupts of your pwm signal.

I’ve used the pulse-in node successfully, on arduino nanos with projects that use 99% of the flash size.

Occasionally calling pulse-in should not be much of an issue, but if you are using it to measure short pulses and calling it as often as possible, it is likely to cause problems because there will be so many interrupts. Switch the pulse-in node to monitor a pin that does not have micro-second pulses & it probably won’t cause a problem. I’ve suggested in another thread on the same topic only checking pulse-in a couple times a second, but I haven’t seen a response to that suggestion.