Giter VIP home page Giter VIP logo

sevenseg's Introduction

Arduino SevenSeg

Getting Started

A sample code for a four-digit common anode display is shown below:

#include <SevenSeg.h>

SevenSeg disp(11,7,3,5,6,10,2);

const int numOfDigits=4;
int digitPins[numOfDigits]={12,9,8,13};

void setup() {
  
  disp.setDigitPins(numOfDigits, digitPins);

}  

void loop() {

    disp.write(13.28);

}

Key functionality includes:

  • Supports arbitrary number of digits and multiple displays
  • Supports displays with decimal points, colon and apostrophe
  • Supports common anode, common cathode and other hardware configurations
  • High level printing functions for easily displaying:
    • Numbers (integers, fixed point and floating point)
    • 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
  • Leading zero suppression (e.g.\ 123 is displayed as 123 rather than 0123 when using 4 digits)
  • No shadow artifact

For further information, please see the attached user guide.

sevenseg's People

Contributors

per1234 avatar sigvaldm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sevenseg's Issues

Setting SymbPins in 4 digit common cathode sev-seg with AP and COLON

I understand that you cannot make a universal library where each and every device would work with. (given time and support from community, maybe).

My 4 digit CC 7-seg with AP and Colon has 12 pins.
7 for A-G segment pins (positive supply or GND)
4 for digit 0-digit 3 digit pins (negative supply)
device pin num 3 for AP and COLON (positive, of course)

I have attached a partial diagram to clarify above details. please, mind that rest of the display works fine just as a normal
SS_colon_pin_diagram

CC 7-seg display.

after probing through pins, I found out
when digit 2 pin and AP/COLON pin activated, AP lights on
when digit 3 pin and AP/COLON pin activated, COLON lights on

I tried with disp.setColonPin(int colonPin).
disp.setColonPin(3);

I tried with disp.setSymbPins(int digPin, int segUCPin, int segLCPin, int segAPIN).
disp.setSymbPins(9, 3, 3, 3);

both will not turn off colon or AP as CC mode will, in off state, supply correct biasing thus turning LEDs on.

Have I missed something?
Is there any simple work around that I can use to overcome this?

I have read through included pdf guide (SevenSeg.pdf)

write(double) works, but could be refined.

write(double) could be refined close to zero. On a four digit display it will now display -0.004 as 0.00 (using only three digits) leaving an open space for minus, and switch to -0.01 for -0.005. This is not incorrect, but consider showing -0.004 as -0.00.

Doesn't work for single display C-561H

I tried on a Common Cathode single display and didn't worked :D

#include <SevenSeg.h>

SevenSeg disp (0,1,2,3,4,5,6) ;

void setup () {
  disp.setCommonCathode();
}
void loop () {
  disp.write(5) ;
}

Display time

Hello. I will like to display time (in hours and minutes) on a display but I cant figure out how the code should look. I have managed to display number on it, using the code below, but I have problems displaying time.

Can you please give me an example for how the code should look for displaying time?

#include <SevenSeg.h>
SevenSeg disp(6,7,8,9,10,11,12);
const int numOfDigits=4;
int digitPins[numOfDigits]={2,3,4,5};
void setup() {
  disp.setDigitPins(numOfDigits, digitPins);
  disp.setCommonCathode();
}  
void loop() {
    disp.write(1111);
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.