forked from jandelgado/jled
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmultiled_mbed.cpp
More file actions
27 lines (24 loc) · 774 Bytes
/
Copy pathmultiled_mbed.cpp
File metadata and controls
27 lines (24 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// JLed multi LED demo for mbed. Controls multiple LEDs parallel in-sync.
//
// mbed version tested with ST Nucleo F401RE
//
// See https://os.mbed.com/platforms/ST-Nucleo-F401RE/ for pin names and
// assignments.
//
// Copyright 2020 by Jan Delgado. All rights reserved.
// https://github.com/jandelgado/jled
//
#include <jled.h>
#include <mbed.h>
int main() {
JLed leds[] = {JLed(LED1).Blink(750, 250).Forever(),
JLed(PA_8).Breathe(2000).Forever(),
JLed(PB_10).FadeOff(1000).Forever(),
JLed(PB_4).FadeOn(1000).Forever(),
JLed(PB_3).Blink(500, 500).Forever()};
JLedSequence sequence(JLedSequence::eMode::PARALLEL, leds);
while (1) {
sequence.Update();
}
return 0;
}