mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 10:37:46 +00:00
examples: add microbit blink example
Signed-off-by: Ron Evans <ron@hybridgroup.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
// blink program for the BBC micro:bit that uses the entire LED matrix
|
||||
package main
|
||||
|
||||
import (
|
||||
"machine"
|
||||
"time"
|
||||
)
|
||||
|
||||
func main() {
|
||||
machine.InitLEDMatrix()
|
||||
|
||||
for {
|
||||
machine.ClearLEDMatrix()
|
||||
time.Sleep(time.Millisecond * 500)
|
||||
|
||||
machine.SetEntireLEDMatrixOn()
|
||||
time.Sleep(time.Millisecond * 500)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user