Index

Microbit LED


The Microbit LED Service is a Bluetooth LE Service specific to the Microbit.

API Reference

How To Connect

The Microbit is a Bluetooth LE device, so you use the Gobot ble.ClientAdaptor to connect. You need to know the BLE address or name of the device.

   bleAdaptor := ble.NewClientAdaptor("c5:b9:46:fd:40:c0")
   ubit := microbit.NewLEDDriver(bleAdaptor)

How To Use

Once you have connected using the ble.ClientAdaptor, you can call any of the Driver's methods, or subscribe to any of the driver's events.
   ubit.Blank()

   gobot.After(1*time.Second, func() {
      ubit.WriteText("Hello")
   })

   gobot.After(7*time.Second, func() {
      ubit.Smile()
   })

Compatibility