Exercises for communications. Versions for NXP FRDM K64F with not external hardware, ST NUCLEO L476RG with IDW04A1 WLAN module, ST NUCLEO L432KC with MOD WIFI ESP8266. UDP message is used for getting a timestamp from a NTP server. Ethernet: https://os.mbed.com/docs/mbed-os/v6.2/apis/ethernet.html WLAN WiFI: https://os.mbed.com/docs/mbed-os/v6.2/apis/wi-fi.html A UDP Socket: UDPSocket.open(), UDPSocket.sendto(), UDPSocket.recvfrom() Based on the OS6.2 API reference UDP Socket example https://os.mbed.com/teams/mbed_example/code/mbed-os-example-udp-sockets//file/cf516d904427/main.cpp/

Files at this revision

API Documentation at this revision

Comitter:
timo_k2
Date:
Sun Dec 12 13:51:01 2021 +0000
Parent:
4:cbc77f552961
Commit message:
Made clear that there are optional pins for the Tx transmit and Rx receive in the L432KC.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed_app.json Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Sep 20 06:50:49 2021 +0000
+++ b/main.cpp	Sun Dec 12 13:51:01 2021 +0000
@@ -4,7 +4,7 @@
  ***********************************
  * NTP time client example
  * A microcontroller board and MOD WIFI ESP8266
- * https://os.mbed.com/docs/mbed-os/v6.2/apis/wi-fi.html
+ * https://os.mbed.com/docs/mbed-os/v6.15/apis/wi-fi.html
  * https://os.mbed.com/teams/ESP8266/code/esp8266-driver/
  * https://www.olimex.com/Products/IoT/ESP8266/MOD-WIFI-ESP8266/open-source-hardware
  * https://os.mbed.com/teams/ESP8266/code/esp8266-driver/docs/tip/classESP8266Interface.html
@@ -18,7 +18,7 @@
  * L432KC 3V3 --- 1 3.3V
  * L432KC GND --- 2 GND
  *  
- * Timo Karppinen 20.9.2021  Apache-2.0
+ * Timo Karppinen 12.12.2021  Apache-2.0
  ***********************************/
 #include "mbed.h"
 
--- a/mbed_app.json	Mon Sep 20 06:50:49 2021 +0000
+++ b/mbed_app.json	Sun Dec 12 13:51:01 2021 +0000
@@ -9,12 +9,12 @@
             "value": "\"YYYYYYY\""
         },
         "esp-rx-pin": {
-            "help": "ESP8266 module Tx pin, Mc Rx",
-            "value": "PA_10"
+            "help": "ESP8266 module Tx pin, Mc Rx PB_7 or PA_10",
+            "value": "PB_7"
         },
         "esp-tx-pin": {
-            "help": "ESP8266 module Rx pin, Mc Tx",
-            "value": "PA_9"
+            "help": "ESP8266 module Rx pin, Mc Tx PB_6 or PA_9",
+            "value": "PB_6"
         }
     },
     "target_overrides": {