Skip to content

This repository is a library for seven segment display with Arduino

License

Notifications You must be signed in to change notification settings

KeithLin724/KYSevenSegment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KYSevenSegment

Written by KYLiN


This is a code using Arduino for control seven segment


Download

Code

you can click the code to download zip

Git

you can use this command to download

git clone https://github.com/KeithLin724/KYSevenSegment


About

Note: The hex code need right to left to print

Here inside have a Easy-HexCodeGenerator only one file for make seven-segment code

! Recommend use HexCodeGenerator


How to use

flow the segment pins to connect and then coding

2 Ways to construct

KYSevenSegment(uint16_t pins[8], bool inv_mode = false);

KYSevenSegment(int a, int b, int c, int d, int e, int f, int g,int dp, bool inv_mode = false);

2 Way to set Mode and Pins

void setInvMode(const bool& inv_mode);

void setPins(uint16_t pins[8]);

Getting Mode function

bool getMode() const;

Display Function

// Display Number 
void displayNumber(const uint16_t& id, const bool& dp = false) const;

// Display using Hex code (you can use easy-HexCodeGenerator)
void displayHex(const byte& value, const bool& dp = false) const;

// Only control DP function 
void onlyControlDP(const bool& dp = false) const;

// clear display function 
void clearDisplay() const;

Example

Example connect