mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-08 17:03:39 +00:00
8b3d323f1b
This is a work in progress. It does not yet work.
22 lines
342 B
Go
22 lines
342 B
Go
package main
|
|
|
|
import (
|
|
"time"
|
|
|
|
"tinygo.org/x/drivers/espradio"
|
|
)
|
|
|
|
func main() {
|
|
time.Sleep(time.Second * 1)
|
|
|
|
println("initializing radio...")
|
|
err := espradio.Enable(espradio.Config{
|
|
Logging: espradio.LogLevelVerbose,
|
|
})
|
|
if err != nil {
|
|
println("could not enable radio:", err)
|
|
} else {
|
|
println("enabled radio successfully")
|
|
}
|
|
}
|