mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-04 23:17:47 +00:00
fix println + cleanup
This commit is contained in:
@@ -19,17 +19,13 @@ const pass = ""
|
||||
var (
|
||||
|
||||
// these are the default pins for the Arduino Nano33 IoT.
|
||||
uart = machine.UART2
|
||||
tx = machine.NINA_TX
|
||||
rx = machine.NINA_RX
|
||||
spi = machine.NINA_SPI
|
||||
spi = machine.NINA_SPI
|
||||
|
||||
// this is the ESP chip that has the WIFININA firmware flashed on it
|
||||
adaptor *wifinina.Device
|
||||
)
|
||||
|
||||
func setup() {
|
||||
uart.Configure(machine.UARTConfig{TX: tx, RX: rx})
|
||||
|
||||
// Configure SPI for 8Mhz, Mode 0, MSB First
|
||||
spi.Configure(machine.SPIConfig{
|
||||
@@ -82,7 +78,7 @@ func printTime() {
|
||||
if err != nil {
|
||||
println("Unknown (error: ", err.Error(), ")")
|
||||
}
|
||||
fmt.Printf("%v\n", time.Unix(int64(t), 0))
|
||||
println(time.Unix(int64(t), 0).String())
|
||||
}
|
||||
|
||||
func printMacAddress() {
|
||||
|
||||
Reference in New Issue
Block a user