Toggle button

Guys , I’m new to the arduino world . I’m on lesson 29 or so of Paul MCcwhorters YouTube series . The thing that has confused me the most is the toggle switch . “One press turns led on and stays on, the other press turns the led off and stays off until pressed again “ I got this to work by following a few codes online but it just isn’t clicking in my brain . The easiest one to code I found was using a Status =false and a status =!status with a IF statement followed by a While in the IF clause .

Can anyone explain the toggle switch on a more simple term?

Thanks

Welcome to the group !

Use CTRL T to format your code.
Attach your ‘complete’ sketch between code tags
[code]Paste your sketch here[/code]

Show us a good schematic of your circuit.
Show us a good image of your ‘actual’ wiring.
Give links to components.
Posting images:
https://forum.arduino.cc/index.php?topic=519037.0

Larry thanks for the reply . I already broke
My setup down . However is a link of one I followed . It worked but just isn’t clicking as to why it works . https://www.google.com/amp/s/www.instructables.com/Most-Simplest-Toggle-Switch-With-Arduino/%3Famp_page=true

It is really not appropriate for you tell us to go to the internet to find what “I” am doing.

There are rules you need to follow on these forums.

https://forum.arduino.cc/index.php?topic=712201.0

My apologies .

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