sparkfun / Serial7SegmentDisplay

Example code and board files for the Serial 7 Segment Display.
https://www.sparkfun.com/products/11629
95 stars 73 forks source link

Add brightness control #5

Closed nseidle closed 12 years ago

nseidle commented 12 years ago

Hi Jim - I added brightness control to the SevSeg library. It is set by two things, the frame period (define FRAMEPERIOD in SevSeg.h), and the brightness level when you call .DisplayString. The display is lit for brightnessLevel number of microseconds then off for the remainder of the frame period (this is very close to what you were doing). I think it's a decent solution, and works well on my OpenSegment display but I need to test it on your unit. I also added an example sketch to show lowest, middle, and highest brightness levels.

jimblom commented 12 years ago

Nice. Seems to work really well. I'm gonna merge this.

I've been playing around a bit with modifying the SevSeg library to include support for the colon and apostrophe. Seems like that's the last step to getting this fully dependent on that library. I'll try submitting a pull request there in a second.