Tag Archive for ‘if-else’

Arduino Workshop, Part 3

Today’s Lesson was about the IF :lol: – ELSE :sad: command. The physical example we used for that was:IF you turn a potentiometer underneath a certain vale, make the LED blink. To keep things easy we used pin 13which has a resistor built in to let the LED blink. I wanted to make things a bot more spicy and also make use of the ELSE IF and ELSE command, so i decided to make a wiring wiith a second LED on pin 12 that work like that: If the value received from the potentiometer is below 100 let LED1 blink, if it’s between 100 and 300 let LED2 blink, if the value is above 300 switch both LED’s constantly on.

Today Code: Continue reading ‘Arduino Workshop, Part 3’

Recent Tweets

Creative Commons License