Tempo Knob

This is my first Arduino project. In this project, the tempo (speed) of the rhythm produced changes when the resistance of the potentiometer changes. In this context, the resistance of the potentiometer will change as I rotate the knob the potentiometer. I’m using Arduino Uno in this project.


  • Arduino Uno x 1
  • Green LEDs x 2
  • Red LED x 1
  • Jumper Wires
  • Potentiometer x 1
  • Piezo Speaker x 1


How it works?

The range of the values output from the potentiometer will be from 0 – 1023, but I do not need such a large value. Therefore, I’ll be mapping the value from 0 – 1023 to 0 – 255. With a smaller value, I can use the new mapped values to set the brightness of the LED. Furthermore, the new “mapped” reading of the potentiometer, newVal, will determine the speed of the rhythm. When the reading of the potentiometer is more than 511, the second LED will be “On” to indicate that the potentiometer has been rotated by more than half.

When newVal = 0, the red LED will be turned on and the rest of the LEDs will be off, as this will be the “off” state of the device.

These are some images of the project:







You may also like...