From c7555a146905fc5b1b45c48dabe98189a55de288 Mon Sep 17 00:00:00 2001 From: Ron Evans Date: Thu, 17 Oct 2019 13:15:55 +0200 Subject: [PATCH] espat: change all examples to use Arduino Nano33 IoT by default Signed-off-by: Ron Evans --- Makefile | 6 +++--- examples/espat/espconsole/main.go | 7 ++++--- examples/espat/esphub/main.go | 7 ++++--- examples/espat/espstation/main.go | 7 ++++--- examples/espat/mqttclient/main.go | 7 ++++--- examples/espat/tcpclient/main.go | 3 ++- version.go | 2 +- 7 files changed, 22 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index c6526ce..ea7ae48 100644 --- a/Makefile +++ b/Makefile @@ -20,9 +20,9 @@ smoke-test: tinygo build -size short -o ./build/test.elf -target=bluepill ./examples/ds1307/time/main.go tinygo build -size short -o ./build/test.elf -target=itsybitsy-m0 ./examples/ds3231/main.go tinygo build -size short -o ./build/test.elf -target=microbit ./examples/easystepper/main.go - tinygo build -size short -o ./build/test.elf -target=itsybitsy-m0 ./examples/espat/espconsole/main.go - tinygo build -size short -o ./build/test.elf -target=itsybitsy-m0 ./examples/espat/esphub/main.go - tinygo build -size short -o ./build/test.elf -target=itsybitsy-m0 ./examples/espat/espstation/main.go + tinygo build -size short -o ./build/test.elf -target=arduino-nano33 ./examples/espat/espconsole/main.go + tinygo build -size short -o ./build/test.elf -target=arduino-nano33 ./examples/espat/esphub/main.go + tinygo build -size short -o ./build/test.elf -target=arduino-nano33 ./examples/espat/espstation/main.go tinygo build -size short -o ./build/test.elf -target=feather-m0 ./examples/gps/i2c/main.go tinygo build -size short -o ./build/test.elf -target=feather-m0 ./examples/gps/uart/main.go tinygo build -size short -o ./build/test.elf -target=microbit ./examples/hd44780/customchar/main.go diff --git a/examples/espat/espconsole/main.go b/examples/espat/espconsole/main.go index 2e5e0bf..ec20aea 100644 --- a/examples/espat/espconsole/main.go +++ b/examples/espat/espconsole/main.go @@ -23,11 +23,12 @@ const actAsAP = false const ssid = "YOURSSID" const pass = "YOURPASS" +// these are the default pins for the Arduino Nano33 IoT. // change these to connect to a different UART or pins for the ESP8266/ESP32 var ( - uart = machine.UART1 - tx = machine.D10 - rx = machine.D11 + uart = machine.UART2 + tx = machine.PA22 + rx = machine.PA23 console = machine.UART0 diff --git a/examples/espat/esphub/main.go b/examples/espat/esphub/main.go index 3f0c247..7d2f450 100644 --- a/examples/espat/esphub/main.go +++ b/examples/espat/esphub/main.go @@ -21,11 +21,12 @@ const actAsAP = false const ssid = "YOURSSID" const pass = "YOURPASS" +// these are the default pins for the Arduino Nano33 IoT. // change these to connect to a different UART or pins for the ESP8266/ESP32 var ( - uart = machine.UART1 - tx = machine.D10 - rx = machine.D11 + uart = machine.UART2 + tx = machine.PA22 + rx = machine.PA23 adaptor *espat.Device ) diff --git a/examples/espat/espstation/main.go b/examples/espat/espstation/main.go index b7674cf..38c4007 100644 --- a/examples/espat/espstation/main.go +++ b/examples/espat/espstation/main.go @@ -21,11 +21,12 @@ const pass = "YOURPASS" // IP address of the listener aka "hub". Replace with your own info. const hubIP = "0.0.0.0" +// these are the default pins for the Arduino Nano33 IoT. // change these to connect to a different UART or pins for the ESP8266/ESP32 var ( - uart = machine.UART1 - tx = machine.D10 - rx = machine.D11 + uart = machine.UART2 + tx = machine.PA22 + rx = machine.PA23 adaptor *espat.Device ) diff --git a/examples/espat/mqttclient/main.go b/examples/espat/mqttclient/main.go index a990100..b43ca0b 100644 --- a/examples/espat/mqttclient/main.go +++ b/examples/espat/mqttclient/main.go @@ -28,11 +28,12 @@ const pass = "YOURPASS" //const server = "tcp://test.mosquitto.org:1883" const server = "ssl://test.mosquitto.org:8883" +// these are the default pins for the Arduino Nano33 IoT. // change these to connect to a different UART or pins for the ESP8266/ESP32 var ( - uart = machine.UART1 - tx = machine.D10 - rx = machine.D11 + uart = machine.UART2 + tx = machine.PA22 + rx = machine.PA23 console = machine.UART0 diff --git a/examples/espat/tcpclient/main.go b/examples/espat/tcpclient/main.go index 3332ff6..831e440 100644 --- a/examples/espat/tcpclient/main.go +++ b/examples/espat/tcpclient/main.go @@ -21,9 +21,10 @@ const pass = "YOURPASS" // IP address of the server aka "hub". Replace with your own info. const serverIP = "0.0.0.0" +// these are the default pins for the Arduino Nano33 IoT. // change these to connect to a different UART or pins for the ESP8266/ESP32 var ( - uart = machine.UART1 + uart = machine.UART2 tx = machine.PA22 rx = machine.PA23 diff --git a/version.go b/version.go index 4dcdfa3..ceae4e3 100644 --- a/version.go +++ b/version.go @@ -2,4 +2,4 @@ package drivers // Version returns a user-readable string showing the version of the drivers package for support purposes. // Update this value before release of new version of software. -const Version = "0.7.0-dev" +const Version = "0.7.0"