Arduino Forum
Why not use: x = !x;?
Other Hardware
LEDs and Multiplexing
SteveThackery
November 4, 2021, 10:48pm
41
Wow! Haven't come across that little beauty before.
show post in topic
Related topics
Topic
Replies
Views
Activity
Not understanding toggle code
Programming
33
10854
May 5, 2021
Conditional in digitalWrite()?
Programming
35
8869
May 5, 2021
Using digitalWrite(x, !digitalRead(x)) to toggle a pin in OUTPUT mode
Programming
135
5403
September 21, 2023
Are digital pin states acting as boolean values indended or a misfeature?
Programming
10
4623
May 5, 2021
Correct use of digital read and bool
General Discussion
168
3013
April 17, 2024