-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
2,057 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Language: Cpp | ||
BasedOnStyle: WebKit | ||
BreakBeforeBraces: Attach | ||
NamespaceIndentation: None |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
QuadDisplay2 | ||
============ | ||
|
||
Arduino library for the [QuadDisplay2] module. | ||
|
||
Installation | ||
============ | ||
|
||
1. Download Library in //.zip// format. | ||
2. Open Arduino IDE. | ||
3. Go to «Sketch» → «Include Library» → «Add .ZIP Library». | ||
4. You will be asked to select the library you would like to add. Navigate to the .zip file's location and open it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Подключаем библиотеку для работы с дисплеем | ||
#include <QuadDisplay2.h> | ||
// создаём объект класса QuadDisplay и передаём номер пина CS | ||
QuadDisplay qd(9); | ||
|
||
void setup() | ||
{ | ||
qd.begin(); | ||
} | ||
|
||
void loop() | ||
{ // можно выводить целые числа | ||
qd.displayInt(123); | ||
delay(1000); | ||
|
||
// и отрицательные тоже | ||
qd.displayInt(-123); | ||
delay(1000); | ||
|
||
// можно показывать ведущие нули (0012) | ||
qd.displayInt(12, true); | ||
delay(1000); | ||
|
||
// можно показывать вещественные числа | ||
// с заданной точностью, например 2 знака после запятой | ||
qd.displayFloat(-1.23, 2); | ||
delay(1000); | ||
|
||
// можно показывать температуру в °C | ||
qd.displayTemperatureC(-5); | ||
delay(1000); | ||
// можно показывать нехитрый текст (on/off, например) или | ||
// произвольную графику | ||
qd.displayDigits(QD_O, QD_f, QD_f, QD_NONE); // off | ||
delay(1000); | ||
qd.displayDigits(QD_O, QD_n, QD_NONE, QD_NONE); // on | ||
delay(1000); | ||
// и, конечно, всё очищать | ||
qd.displayClear(); | ||
delay(1000); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
####################################### | ||
# Syntax Coloring Map Dragster | ||
####################################### | ||
|
||
####################################### | ||
# Datatypes (KEYWORD1) | ||
####################################### | ||
|
||
QuadDisplay KEYWORD1 | ||
|
||
####################################### | ||
# Methods and Functions (KEYWORD2) | ||
####################################### | ||
|
||
begin KEYWORD2 | ||
end KEYWORD2 | ||
displayInt KEYWORD2 | ||
displayFloat KEYWORD2 | ||
displayDigits KEYWORD2 | ||
displaySegments KEYWORD2 | ||
displayTemperatureC KEYWORD2 | ||
displayHumidity KEYWORD2 | ||
displayScore KEYWORD2 | ||
displayClear KEYWORD2 | ||
|
||
####################################### | ||
# Constants (LITERAL1) | ||
####################################### | ||
|
||
QD_NONE LITERAL1 | ||
QD_DOT LITERAL1 | ||
QD_MINUS LITERAL1 | ||
QD_UNDERSCORE LITERAL1 | ||
QD_DEGREE LITERAL1 | ||
QD_UNDER_DEGREE LITERAL1 | ||
QD_0 LITERAL1 | ||
QD_1 LITERAL1 | ||
QD_2 LITERAL1 | ||
QD_3 LITERAL1 | ||
QD_4 LITERAL1 | ||
QD_5 LITERAL1 | ||
QD_6 LITERAL1 | ||
QD_7 LITERAL1 | ||
QD_8 LITERAL1 | ||
QD_9 LITERAL1 | ||
QD_A LITERAL1 | ||
QD_a LITERAL1 | ||
QD_b LITERAL1 | ||
QD_C LITERAL1 | ||
QD_c LITERAL1 | ||
QD_d LITERAL1 | ||
QD_E LITERAL1 | ||
QD_f LITERAL1 | ||
QD_F LITERAL1 | ||
QD_H LITERAL1 | ||
QD_h LITERAL1 | ||
QD_I LITERAL1 | ||
QD_J LITERAL1 | ||
QD_K LITERAL1 | ||
QD_L LITERAL1 | ||
QD_n LITERAL1 | ||
QD_o LITERAL1 | ||
QD_O LITERAL1 | ||
QD_P LITERAL1 | ||
QD_r LITERAL1 | ||
QD_S LITERAL1 | ||
QD_t LITERAL1 | ||
QD_u LITERAL1 | ||
QD_U LITERAL1 | ||
QD_Y LITERAL1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name=QuadDisplay | ||
version=1.0.0 | ||
author=Amperka <[email protected]> | ||
maintainer=Amperka <amperka.ru> | ||
sentence=A library for quad 7-segment display module | ||
paragraph=The library allows you to display digits and any sign on module. | ||
category=Device Control | ||
url=https://github.com/amperka/QuadDisplay2 | ||
architectures=* |
Oops, something went wrong.