Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Michal Rybka
vanocni-stromecek-s-ArduinoNano-v3
Commits
f48de9cf
Commit
f48de9cf
authored
Oct 15, 2019
by
Michal Rybka
Browse files
Upload New File
parent
e8f21ce9
Changes
1
Hide whitespace changes
Inline
Side-by-side
FW/TEST_STROMECKU.ino
0 → 100644
View file @
f48de9cf
/*
Test stromecku otestuje postupne všechny RGB LED.
*/
// initialize digital pin
const
int
LED1
=
0
;
// the number of the LED pin
const
int
LED2
=
1
;
// the number of the LED pin
const
int
LED3
=
9
;
// the number of the LED pin
const
int
LED4
=
4
;
// the number of the LED pin
const
int
LED5
=
10
;
// the number of the LED pin
const
int
LED6
=
5
;
// the number of the LED pin
const
int
LED7
=
11
;
// the number of the LED pin
const
int
LED9
=
6
;
// the number of the LED pin
const
int
LED10
=
12
;
// the number of the LED pin
const
int
LED11
=
13
;
// the number of the LED pin
const
int
BLUE
=
17
;
// the number of the BLUE pin
const
int
GREEN
=
18
;
// the number of the GREEN pin
const
int
RED
=
19
;
// the number of the RED pin
// the setup function runs once when you press reset or power the board
void
setup
()
{
pinMode
(
LED1
,
OUTPUT
);
// set OUTPUT
pinMode
(
LED2
,
OUTPUT
);
// set OUTPUT
pinMode
(
LED3
,
OUTPUT
);
// set OUTPUT
pinMode
(
LED4
,
OUTPUT
);
// set OUTPUT
pinMode
(
LED5
,
OUTPUT
);
// set OUTPUT
pinMode
(
LED6
,
OUTPUT
);
// set OUTPUT
pinMode
(
LED7
,
OUTPUT
);
// set OUTPUT
pinMode
(
LED9
,
OUTPUT
);
// set OUTPUT
pinMode
(
LED10
,
OUTPUT
);
// set OUTPUT
pinMode
(
LED11
,
OUTPUT
);
// set OUTPUT
pinMode
(
BLUE
,
OUTPUT
);
// set OUTPUT
pinMode
(
GREEN
,
OUTPUT
);
// set OUTPUT
pinMode
(
RED
,
OUTPUT
);
// set OUTPUT
}
// the loop function runs over and over again forever
void
loop
()
{
digitalWrite
(
RED
,
HIGH
);
digitalWrite
(
GREEN
,
LOW
);
digitalWrite
(
BLUE
,
LOW
);
digitalWrite
(
LED1
,
LOW
);
digitalWrite
(
LED2
,
LOW
);
digitalWrite
(
LED3
,
LOW
);
digitalWrite
(
LED4
,
LOW
);
digitalWrite
(
LED5
,
LOW
);
digitalWrite
(
LED6
,
LOW
);
digitalWrite
(
LED7
,
LOW
);
digitalWrite
(
LED9
,
LOW
);
digitalWrite
(
LED10
,
LOW
);
digitalWrite
(
LED11
,
LOW
);
delay
(
5000
);
digitalWrite
(
RED
,
LOW
);
digitalWrite
(
GREEN
,
HIGH
);
digitalWrite
(
BLUE
,
LOW
);
digitalWrite
(
LED1
,
LOW
);
digitalWrite
(
LED2
,
LOW
);
digitalWrite
(
LED3
,
LOW
);
digitalWrite
(
LED4
,
LOW
);
digitalWrite
(
LED5
,
LOW
);
digitalWrite
(
LED6
,
LOW
);
digitalWrite
(
LED7
,
LOW
);
digitalWrite
(
LED9
,
LOW
);
digitalWrite
(
LED10
,
LOW
);
digitalWrite
(
LED11
,
LOW
);
delay
(
5000
);
digitalWrite
(
RED
,
LOW
);
digitalWrite
(
GREEN
,
LOW
);
digitalWrite
(
BLUE
,
HIGH
);
digitalWrite
(
LED1
,
LOW
);
digitalWrite
(
LED2
,
LOW
);
digitalWrite
(
LED3
,
LOW
);
digitalWrite
(
LED4
,
LOW
);
digitalWrite
(
LED5
,
LOW
);
digitalWrite
(
LED6
,
LOW
);
digitalWrite
(
LED7
,
LOW
);
digitalWrite
(
LED9
,
LOW
);
digitalWrite
(
LED10
,
LOW
);
digitalWrite
(
LED11
,
LOW
);
delay
(
5000
);
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment