hold a value for three seconds whenever it begins to fall
OK so first things first, SOMETHING worked a little
The above is a screenshot of when in1 is fed a triangle wave: the result changes shape only when in1 rises [ish?]: the result of the [global] chain tracks in1 only when in1 rises. I may want to add a slew there, but I’m not clear yet if it’s just a dead end.
I’m genuinely confused about the track / sample and hold units, esp in this firmware.
But anyway, the main issue is what I said about delay. I need to work out how to hold in1 for three seconds when it falls. i.e.how to get a track and hold to hold in1 whenever in1 falls – triggered by the above chain – then getting it to track again three seconds later. I hoped this could be done by converting the above chain into a trigger, and adding a three second delay that switches it to track. The problem is I cannot easily see a way so that only that delayed trigger gets the track and hold to track: what if the signal rises and falls again in those three seconds?
Returning the higher value-- of in1 and the hold – would only be necessary when that is achieved. It’s probably yet more complicated than that, but it’s a start.
Sorry if I’m misusing the forum: just thinking out loud / wondering if anyone knows how to do the task or sub-tasks I’m talking about.