Skip to main content

Posts

Showing posts with the label Binary counting

How to Blink LED Lights in Binary Pattern with Arduino

Learn how to use four different colored LEDs In a faraway kingdom,  there was a powerful wizard who could control the elements with his magic.  He had four special orbs that glowed with the colors of the elements: red for fire, blue for water, green for earth and yellow for air. The wizard had discovered a secret language that only the wisest of creatures could understand. It was called binary and it used only two symbols: 0 and 1. With this language, the wizard could communicate with the spirits of the elements and command them to do his bidding. One day, the wizard decided to create a spell that would make his orbs glow in a special pattern. He wrote the spell using a magical code that looked like this: int yellowLED = 7 ; int redLED = 6 ; int blueLED = 13 ; int greenLED = 11 ; int dit = 100 ; int dat = 500 ; These lines declare variables that will be used in the program. The variables yellowLED, redLED, blueLED, and greenLED are set to specific numbers that ...