Simple Circuits and Code

In this lesson, we continued to build our understanding of using the Arduino IDE by moving onto creating simple circuits through using variables.

As a continuation from last time, we modified the existing code, to be able to work with multiple LEDs simultaneously rather than one individual LED. The code and output from these modifications are shown below.

A screenshot of the modifications to my code allowing for the use of LEDs on multiple Digital Pins.
The resulting output from the modified code.

Additionally, we also explored the use of variables and how they can improve and affect our workflow (with regards to managing and setting multiple values at once).

An example of using variables to set LED Pins.

Furthermore, we explored the use of bouncing variables to allow for values to change between positive and negative.

Download the code from this blog from here:

Leave a Reply

Your email address will not be published. Required fields are marked *