Arduino Playground is read-only starting December 31st, 2018. For more info please look at this Forum Post

SevenSeg v1.2

SevenSeg is aflexible library for Arduino for outputting information to 7-segment (seven segment) displays. The main focus is to be a library which gets you started quickly while being flexible and cover most needs. That is, the most common 7-segment displays should be easily connected to an Arduino and information of various kinds should be easily output to it. This library is intended for beginners as well as more sophisticated users who just want something up and running. It is not intended to be an extremely lightweight library. Key functionality includes:

  • Supports arbitrary number of digits
  • Supports displays with decimal points, colon and apostrophe
  • Supports common anode, common cathode and other hardware congurations
  • High level printing functions for easily displaying:
    • Numbers (integers, fixed point and float)
    • Text strings
    • Time (hh:mm) or (mm:ss)
  • Automatic multiplexing with adjustable refresh rate
  • Adjustable brightness through duty cycle control
  • Use of interrupt timers for multiplexing in order to release resources, allowing the MCU to execute other code
  • No shadow artifact
  • PDF user guide included

New key features:

  • Supports up to 9 digits
  • Supports String objects
  • Leading zero suppression (i.e. 12 shows up as 12 rather than 0012)

Feel free to contact me with suggested improvements and corrections (marholm[at]marebakken.com).

DISCLAIMER: I do not take any responsibility for the usage of my code (or additional material such as the user guide). Although I've tested most of it, some parts may not be working, and some information herein may not be correct. Updates and backward/-forward compatibility are not guaranteed (but it may still happen). Use it at your own risk. I do provide it free of charge for non-commercial purposes.

NB: SevenSeg has moved to GitHub: https://github.com/sigvaldm/SevenSeg

USER GUIDE: https://github.com/sigvaldm/SevenSeg/raw/master/SevenSeg.pdf

DOWNLOAD IT HERE: https://github.com/sigvaldm/SevenSeg/archive/master.zip