# The Code

Since designing it was pretty simple, writing the code was also fairly straightforward.

[![Screenshot_2025-11-25_08-11-39.png](https://wiki.piflyer.net/uploads/images/gallery/2025-11/scaled-1680-/screenshot-2025-11-25-08-11-39.png)](https://wiki.piflyer.net/uploads/images/gallery/2025-11/screenshot-2025-11-25-08-11-39.png)

I used digital pin 9 for the LED control and the A0 for the potentiometer control.

Another cool use for this is a piezo, because it makes all the different notes, like a tuner.