Skip to content

Bitwise operators are used in order to modify a bit or bits of any given byte.

So whenever you want to modify less than a byte you can do it using this technique.

Using the bitwise operators you can save memory by packing multiple data items in a single byte.

Do not confuse the boolean operators AND(&&) OR(||) and NOT(!) with the bitwise operators AND(&) OR(|) NOT(~).

Let's start with the four most common bitwise operations : AND , OR , XOR and NOT.

...continue reading "Arduino Bitwise Operators and advanced tricks"

And something else, which we'll start with before trying to regulate our traffic.

We'll use LEDs (Light Emitting Diode): 1 red, 1 yellow and... ?!?!
yes, 1 green.

In the first part every LED will be gradually turned from off to on and viceversa.

After that, the traffic lights:  just one LED on.

We need following stuff:
...continue reading "Manual and Automatic Traffic Lights"