Skip to content

Commit a00a51e

Browse files
deadprogramaykevl
authored andcommitted
examples: add microbit blink example
Signed-off-by: Ron Evans <[email protected]>
1 parent 745b5df commit a00a51e

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// blink program for the BBC micro:bit that uses the entire LED matrix
2+
package main
3+
4+
import (
5+
"machine"
6+
"time"
7+
)
8+
9+
func main() {
10+
machine.InitLEDMatrix()
11+
12+
for {
13+
machine.ClearLEDMatrix()
14+
time.Sleep(time.Millisecond * 500)
15+
16+
machine.SetEntireLEDMatrixOn()
17+
time.Sleep(time.Millisecond * 500)
18+
}
19+
}

0 commit comments

Comments
 (0)