Pulse width extender

hi, i´m from Venezuela, sorry my english
i would like to build a pulse width extender:
i receive pulses from a source and i whant to add a variable amount of pulse wide, i would like to use 2 buttons, 1 for add and other for lower
if anybody can help me do do it i appreciate it much.

Add a “delay” node and you can vary the pulse duration depending on the frequency

nkrkv rotary encoder library has an up-down counter, you can set step of 0.01 as an example

thanks to you, i´m not a good programmer, i´ll work in it

is there in XOD a oscilloscope virtual tool ? or whatever let me see what i´m doing ?


min-max not is for it , use https://xod.io/libs/nkrkv/encoder/count/

search the library, from the add button look for nkrkv/encoder

Use “watch” node, it’s not like a graphic function but it helps

thanks to you. it help me a lot


but you don’t load it to a board or simulate it, it only works if you simulate or debug

in step de count place a tweak-number so you can vary in simulation …

Or, more directly, replace buttons with tweak-pulse or tweak-boolean…

Note: The above code will provide a minimum pulse width at least delay-T long, but it will not ADD the delay to each pulse. In fact, if original pulse is greater than delay-T, the resulting pulse will only be delay-T.

You could add delay to pulse by using pulse-on-false to start timer when pulse ends and OR it with the actual pulse. You might get a quick dip in your pulse before delay starts, though. Adding a defer between the pulse source and the OR would probably eliminate the quick dip, but it will also delay the start of the output pulse.


NOTE: probably none of this will work if you are trying to manage very short pulses (micro-second? I don’t know what the limit is…) since Arduino may not be fast enough (especially if there is other code running at the same time). You certainly won’t be able to see short pulses using a watch node…

to add something step to 1, it may be too much if the frequency is high and you will not see a difference, you may need 0.1, 0.01 or 0.001

the pulse width is goin to be between 0 and 30 ms

how do i search those (puls… and or ) in the libraries ?

PD: i already found IT THANKS

STEP 1 = 1sec DELAY
use STEP 0.001 to 0.03

pulse-on-true or pulse-on-false

STEP 1 = 1sec DELAY
use STEP 0.001 to 0.03

Where do i have to set it ?

in count change step (in inspector node) or add tweak-number as I indicated above

can i push the tweaks buttons in real time in the simulation?
i can´t post untill 18 hours because i´m new ITS WORKING THANKS

Select or use double click, change in the inspector.

External libraries will give error, use debug and upload

For most tweak-* nodes, you select the node, then update the value in the inspector sub-window to the left. For tweak-pulse, instead of updating a value, you just push the Pulse button where value would normally be. Each click on that button will send another pulse.