Potentiometer Blink

Jump to: navigation, search

Due Date

Friday, December 7

About the Project

In this project, you and your group of 1-2 other people will be writing code to make an LED blink at different frequencies depending on how far you turn a potentiometer. Each person should write the code for this project in your group, but only one person has to show it to an officer for check-off. Please form groups of 2-3 people here:


Note that these groups are temporary, for this project. In the future, we will be making permanent groups (starting mid-winter quarter), start thinking about who you want to be with!

For this project, you should follow this general process:

1. Form a group of 2-3 people and document your names on the sheet above

2. Go to Bruno or Kaleb to check out your Arduino

3. Build your circuit and write the code for that circuit in Arduino

4. Come back to an officer to check out a cable and test your circuit

5. Get asked check-off questions if your circit works, or look over your code/debug your circuit if it doesn't (look at the slides!)

Slides: https://docs.google.com/presentation/d/1jlvQ90tAVm3VCDHgJhcT41ztzpxh0d7a9bHHa6ODZoQ/edit?usp=sharing

Arduino datasheet: https://store.arduino.cc/usa/arduino-nano (look under documentation)


Cooperation is key!

  • If you're having upload issues, there are a number of things you can check:
   1) Check your COM port for the upload, under Tools. While your Arduino is plugged in, go to Device Manager and it will show you what COM is being used
   2) Make sure you have the Arduino NANO selected as the device under Tools
   3) Try using an older bootloader for the processor under Tools
   4) If it says that you have a file error, then you probably move a lot of your files around and messed up the directory for Arduino. Shame on you.


Potentiometer Blink Schematic


Potentiometer Blink Pseudocode

Each pseudocode should be about a line of code, though there are a few statements missing. Can you find what they are?

Delay Function

Arduino has a delay function, fomatted as "delay(value);". the value put into this delay funciton is in milliseconds, and it is the time the circuit will wait before moving on to the next line of code. You WILL need to use this function for your project, so try and figure out a way you can vary value so that your LED can get different frequencies.

Voltage Divider

A voltage divider is a circuit that produces an output voltage that is a fraction of its input voltage. Voltage division is the result of distributing the input voltage among the components of the divider, which in this case will be resistors. To learn more about voltage dividers, take a look at the first half of this video:


Where in the World

The answer to the Where in the World today was Rio De Janeiro, Brazil! Thanks for participating :)