The wokwi works perfectly, that is to say it does the your code will do IRL. 99.999
percent on that.
Maybe the iPad screen refresh makes the servo twitches look funny. I don't want to start any kind of war, but they are "5 by 5" on my iMac. Could it be that Windows or the machine you run it on are introducing an "iPad" effect?
So - for testing make the sweep and gap between them quite longer. I used 500 milliseconds and the iPad version didn't look so odd anymore. Natch you'll want to switch back to the timing that works in the real version later.
-
Comment out just the Red Video timing section and see the KA work well.
-
Comment out just the
BlueYellow KA section and see the Video work well.
Human factors tip: light works faster on the brain here. Turn on the pilot LEDs in both sections before you make the servo arm move.
With the KA gap of 5 and the short Video test length, it's actually kinda hard not to get a KA tap after the end video tap.
Adding the scoot thing I suggested above fixes that: reset the KA tap timing right after the video finishes and you won't get a KA tap piling on.
The input pulse is plenty long, too long for 4 second testing in fact, but OK for the longer video interval.
Remains only the problem of getting a video initiation too very close to a KA tap. Imma let you have the fun of solving that, if it even is a problem for real. Estimated difficulty: you got this.
BTW/FWIW when I look at my own, locked, wokwi sims, the only menu option available is "Save A Copy", until I unlock it. I dare to hope that only I could do (unlock it), therefor others will only be able to save their own copy, not mess up mine.
Oddly, there is nothing to prevent one person from having multiple projects with the same name, which can be a bit confusing to say the leas. I am now in the habit of renaming anything I start with, empty sketch or copy, to something new, unique and, with any luck, meaningful.
It has been fun using the servo object in the simulator, and I think this is a nice project; there is a charm to using a servo to press a button. It reminds me of the old days when we weren't allowed to mess with Ma Bell's telephone equipment - let's just say there was some innovation involved in working around that when we bothered to do.
HTH
a7