Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Multiplication Trainer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RAJlab
Multiplication Trainer
Commits
20dcbe3e
Commit
20dcbe3e
authored
1 year ago
by
Václav Aubrecht
Browse files
Options
Downloads
Patches
Plain Diff
deleted some shit
parent
9fe3a870
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
FW/multiplication_trainer_selftest.ino
+48
-4
48 additions, 4 deletions
FW/multiplication_trainer_selftest.ino
with
48 additions
and
4 deletions
FW/multiplication_trainer_selftest.ino
+
48
−
4
View file @
20dcbe3e
//Toto je dementní selftest, kde půlka esenciálních informací
jistě
chybí
//Toto je dementní selftest, kde půlka esenciálních informací chybí
#include
"LedControl.h"
//Konfigurace segmentů, protože j
istý Václav Aubrecht se slepej
//Konfigurace segmentů, protože j
sem slepej dement.
const
int
s1
=
0
;
const
int
s2
=
1
;
const
int
s3
=
3
;
...
...
@@ -12,11 +12,33 @@ const int s6 = 2;
const
int
s7
=
6
;
const
int
s8
=
7
;
//Inicializace SPI
pro instanci LedControl ic
//Inicializace SPI
LedControl
lc
=
LedControl
(
11
,
13
,
9
,
1
);
unsigned
long
delaytime
=
250
;
byte
alldigits
=
B11111111
;
byte
A
=
B01110111
;
byte
C
=
B01001110
;
byte
b
=
B00011111
;
byte
d
=
B00111101
;
byte
E
=
B01001111
;
byte
F
=
B01000111
;
byte
G
=
B01011111
;
byte
H
=
B00110111
;
byte
I
=
B00110000
;
byte
J
=
B00111100
;
byte
L
=
B00001110
;
byte
n
=
B00010101
;
byte
O
=
B01111110
;
byte
P
=
B01100111
;
byte
r
=
B00000101
;
byte
S
=
B01011011
;
byte
t
=
B00001111
;
byte
U
=
B00111110
;
byte
v
=
B00011100
;
byte
y
=
B00110011
;
byte
Z
=
B01101011
;
void
setup
()
{
lc
.
shutdown
(
0
,
false
);
//Vzbuzení ICčka
...
...
@@ -24,6 +46,28 @@ void setup() {
lc
.
clearDisplay
(
0
);
//Vyčištění displeje
}
/* B00000001 G
B00000010 F
B00000100 E
B00001000 D
B00010000 C
B00100000 B
B01000000 A
B10000000 DP
-----A-----
I I
F B
I I
-----G-----
I I
E C
I I
-----D-----
DP
B01001111
*/
void
scrollDigits
()
{
//(nevim, dej tam nulu; segment; hexadecimální číslo, který to má zobrazit; false);
lc
.
setDigit
(
0
,
s1
,
6
,
false
);
...
...
@@ -57,8 +101,8 @@ void displayAllDigits() {
delay
(
delaytime
);
}
void
loop
()
{
scrollDigits
();
displayAllDigits
();
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment