Browse Source

examples: replace fmt with encoding/hex in usb-midi example

Signed-off-by: deadprogram <ron@hybridgroup.com>
pull/3665/head
deadprogram 2 years ago
committed by Ron Evans
parent
commit
48ef68dd86
  1. 5
      src/examples/usb-midi/main.go

5
src/examples/usb-midi/main.go

@ -1,9 +1,10 @@
package main package main
import ( import (
"fmt"
"machine" "machine"
"machine/usb/midi" "machine/usb/midi"
"encoding/hex"
"time" "time"
) )
@ -20,7 +21,7 @@ func main() {
m := midi.Port() m := midi.Port()
m.SetHandler(func(b []byte) { m.SetHandler(func(b []byte) {
led.Set(!led.Get()) led.Set(!led.Get())
fmt.Printf("% X\r\n", b) println(hex.EncodeToString(b))
m.Write(b) m.Write(b)
}) })

Loading…
Cancel
Save