You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 17, 2022. It is now read-only.
Asynchronous, flexible, customizable library for managing seven-segment indicators under Arduino control
Library size: 1 088 bytes
Minimum Memory Usage: 36 bytes
Important! May not be compatible with Servo library
Features:
asynchronous display refresh
user specified refresh rate (+/- 3Hz)
user specified number of displays
support different common pins ( cathode / anode )
display strings, negative or positive integers or floats
support for most latin characters ( excluding K, M, V, W, X, Z )
Guide:
Instalation
Download the Displayer_vX.X.zip file added to the latest release.
Unzip the downloaded archive into the folder "~Documents/Arduino/libraries/"
Use
Include library header
#include<Displayer.h>
Сreate two constant arrays listing segments pins and indicator common pins inside setup() and call Inintialization method
voidsetup()
{
// From A to DPconstshort segmentPins[] = { 2, 3, 4, 5, 6, 7, 8, 9 };
// From left to rightconstshort сommonPins[] = { 13, 11, 10 };
// No need to create a prototype of the Displayer class
Displayer.Initialize
(
Common_cathode, // Common pin type on your display (Common_cathode or Common_anode)
segmentPins, // The array of segment pins you created sizeof сommonPins/ sizeof(short),// Number of indicators
сommonPins, // The array of indicator pins you created 75// Required display refresh rate
);
}
Call the Show() method to display something
Examples:
// Simple int counterint number = 1;
voidloop()
{
Displayer.Show(number);
++number;
// you can lock the main cycle, the display will still be refreshingdelay(1000);
}
// Simple float counterfloat number = 0.f;
voidloop()
{
Displayer.Show(number);
number += 0.1f;
// you can lock the main cycle, the display will still be refreshingdelay(1000);
}
// Show() method capabilitiesvoidloop()
// String will be displayed until the next Show() method call
Show("ABCXF");
// characters that cannot be displayed on the seven-segment indicator will be ignored// if string or number does not fit on the display, the right side will preferably be displayed.// On the display with 3 indicators the line will be displayed like this: "C F"delay(1000);
Show(12345);
// On the display with 3 indicators the line will be displayed like this: "345"delay(1000);
Show(-0.125f);
// The maximum possible number of decimal places will be displayed// First zero will be ignored// On the display with 3 indicators the line will be displayed like this: "-.125"delay(1000);
}