Saturday, July 29, 2017

7 Segment LED and Potentiometer Control

I harvested a nice single 7-segment LED display off a control panel board of an old printer/scanner that was discarded on the sidewalk. It turns out to be this component. After looking at some Arduino 7-segment display tutorials I focused on this one and saw that I could connect the pins directly to the Arduno pinouts without needing any driver. I could also figure out the pins for each segment by trial-and-error and the datasheet showed it is common anode, so needed to connect to 5V not GND, and adjust the sample sketch in the tutorial accordingly.

I got it counting 0-9 then I added a pot for a little more fun.
Here is the sketch that allows you to turn the pot to set the digit displayed.