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