boolean sensorValue = digitalRead(2); // returns 0 or 1sensorValue =~ sensorValue; // Not operation and value becomes 255 or 254
sensorValue =! sensorValue;
Ladies and gentlemen, the competition for the forum's shortest post is now over.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16