PB and Slider Switch on Wokwi

Hi guys!

Is there a possibility to make the function of the slider switch in wokwi to be like a pushbutton? I know you would suggest to use PB instead of the slider, however my experiment requires a slider switch and it totally gives me different output between the PB and the SS if I changed them one by one.

Map PBON to one half of the slider range and PBOFF to the other half.

1 Like

Can I ask for an example code for this?

Can I ask for an example code for this?

Perhaps you could wire and configure them to work the same. In this Wokwi example:

  • I turned off bounce for both the slide and push button switch (check diagram.json).
  • You can latch the PB on by click and hold, then drag the mouse cursor away, then release.
1 Like

I read this as a slide potentiometer, not a make/break switch. My mistake. Sorry.

Thanks.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.