Code Monkey home page Code Monkey logo

display7's Introduction

๐Ÿ•น Arduino 7 Segment Display

This Arduino library provides an easy way of displaying of numbers (HEX) and pretty much anything. It supports common anode displays and common cathode ones.

๐ŸŽˆ Porpose

I needed a library for displaying numbers into a 7 segment display, and now I have it. I hope it helps.

โš™ Usage

For binding a Display, you must create an instance of Display7 class. Like this.

// Create the Display object
Display7 myDisplay(7, 8, 9, 10, 11, 12, 13);

// Or create it using an Array.
int pins[7] = {7, 8, 9, 10, 11, 12, 13};
Display7 myDisplay(pins);

If you want to use a common anode display, you can do it by changing the commonAnode property.

myDisplay.commonAnode = true;
  • number(): It displays a given number. Supports number up to 15 (displays numbers in traditional 7 segment display HEX).
myDisplay.number(6);
  • showAndHide(): Displays a number for a given time, then it turns off.
myDisplay.showAndHide(2, 2600);
  • custom(): You feed it with the states of the segments, either it is a common anode display or an common cathode one. It works the same way.
// It displays an "H".
myDisplay.custom(0, 1, 1, 0, 1, 1, 1);

// Using an array
int mySegments[7] = {0, 1, 1, 0, 1, 1, 1};
myDisplay.custom(mySegments);
  • test(): It displays a sequence of numbers to test the display.
myDisplay.test();
  • clear(): Well, it clears the display.
myDisplay.clear();

๐ŸŽ‰ It Works ๐ŸŽ‰

To use it, copy-paste the Display7 Folder into your libraries folder. Feel free to contribute or use it.

display7's People

Contributors

beto-bit avatar

Stargazers

 avatar

Watchers

 avatar

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.