Dave Jones

My Place On The Net

COVID-19 Vlog #1 - Tinkering with an Arduino Uno and variable resistor (potentiometer).

In this video I introduce my long-term goal to control the brightness of my home through the rotation of my wrist (and therefore my Android Wear OS smartwatch). Credit to my Cousin Hugo for the idea.

Before we get bogged down with Android development, let’s develop a proof-of-concept using an Arduino. First challenge, how do we wire up a variable resistor (potentiometer), read the current resistance into the Arduino’s software and use the numbers we see to make decisions?

Original video explaining potentiometer wiring and code snippet
🎬Playlist of all VLOG entries

Circuit-board parts:

  1. An Arduino Controller (I have the Arduino Uno but anything with a few IO (input output) pins would work). Make sure some of the output pins support PWM (Pulse Width Modulation) so you can set the LED to a dimmable value, rather than simply on and off.
  2. A breadboard for easy circuit construction.
  3. A variable resistor AKA potentiometer. I'm using a B50K.
  4. 220 Ω resistor to avoid burning out the LED.
  5. Some jumper cables to connect everything together.