In this lesson, we will build upon what we’ve already done by adding a servomotor. Remember, my goal was to simulate a railroad crossing by having two flashing LEDs for the signpost, two LEDs for the crossbar that drops down across the road, and the bar itself to lower and…
leds
-
-
In this lesson, we will create a simple build using a pushbutton and 4 LEDs. I’ve got an idea for a project that would simulate a railroad crossing with a flashing signal, a buzzer for the siren, and a crossbar that lowers and raises with the press of a button.…
-
So far we’ve been writing digital signals to control an LED. Today we will use analogWrite to do it in a similar way, but now we will use Pulse Width Modulation (PWM) over an analog pin. I highly recommend watching Paul McWhorter’s video on PWM for a detailed explanation of…
-
In our last lesson, we set up three LEDs and wrote code to blink them on and off, using variables to represent the different digital pins. We basically copied and pasted the code in order to blink an LED the number of times we wanted. Today, we are going to…