Many Ways to Blink 1: Potentiometer to LED

This series of tutorials focuses on demonstrating the power of system thinking. We will start with the Potentiometer –> Arduino –> LED system you have seen in the beginning class. We will then switch out the inputs and the outputs and then change the code to adapt the input to the output. Throughout this whole series the system will have the same behavior. This is the input will control the blink rate of the output. To begin with we will go through the code you have seen before. This tutorial will focus on how the code is organized and how to see what the code is doing while it is running.

#Block Diagram Pot to LED System

Circuit

Code

ANALOG_IN System

and the new system is

Pot to LED System

Serial.begin(9600);

The “9600” declares what speed we will communication at.

Serial.print("Sensor value: ");  Serial.println(sensorValue);

The is we send then name of the variable and then we send the variable it self and then moves to the next line in the Serial Monitor. Even though these are two separate commands they are shown on the same line to make it easier for a human to read the code.

Serial.print("Sensor value: ");  Serial.println(sensorValue);