From 2b68726b662c504073c332694d9c58c6430a13a9 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Wed, 11 Sep 2024 09:28:24 +0200 Subject: [PATCH 1/4] Rename firmware for OPC UA server capabilities to "opta_opcua_server" to make it very clear that this specific example is for Arduino Opta (in case we want to support different boards in the future. --- README.md | 2 +- examples/opcua_server/README.md | 7 ------- examples/opta_opcua_server/README.md | 9 +++++++++ .../opta_opcua_server.ino} | 0 4 files changed, 10 insertions(+), 8 deletions(-) delete mode 100644 examples/opcua_server/README.md create mode 100644 examples/opta_opcua_server/README.md rename examples/{opcua_server/opcua_server.ino => opta_opcua_server/opta_opcua_server.ino} (100%) diff --git a/README.md b/README.md index f763cbf..5e7760b 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This library provides an implementation of [OPC UA](https://en.wikipedia.org/wik Furthermore, the library supports automatic detection, configuration and exposure of up to two Arduino Opta Expansion Boards (i.e. Digital Expansion w/ mechanical relays [`D1608E`](https://store.arduino.cc/products/opta-ext-d1608e), Digital Expansion w/ solid-state relays [`D1608S`](https://store.arduino.cc/products/opta-ext-d1608e), Analog Expansion [`A0602`](https://store.arduino.cc/products/opta-ext-a0602)) via OPC UA. ### How-to-OPC UA -* Compile and upload [`examples/opcua_server`](examples/opcua_server/opcua_server.ino) +* Compile and upload [`examples/opcua_server`](examples/opta_opcua_server/opta_opcua_server.ino) ```bash arduino-cli compile --fqbn arduino:mbed_opta:opta -v examples/opcua_server -u -p /dev/ttyACM0 ``` diff --git a/examples/opcua_server/README.md b/examples/opcua_server/README.md deleted file mode 100644 index 003e523..0000000 --- a/examples/opcua_server/README.md +++ /dev/null @@ -1,7 +0,0 @@ -:floppy_disk: `opcua_server.ino` -================================ - -### How-to-build Modbus MD02 demo -```bash -arduino-cli compile --fqbn arduino:mbed_opta:opta examples/opcua_server -v --build-property compiler.cpp.extra_flags="-DUSE_MODBUS_SENSOR_MD02=1" -``` diff --git a/examples/opta_opcua_server/README.md b/examples/opta_opcua_server/README.md new file mode 100644 index 0000000..d24f385 --- /dev/null +++ b/examples/opta_opcua_server/README.md @@ -0,0 +1,9 @@ +:floppy_disk: `opta_opcua_server.ino` +===================================== + +### How-to-build Modbus MD02 demo +```bash +arduino-cli compile --fqbn arduino:mbed_opta:opta \ + examples/opta_opcua_server -v \ + --build-property compiler.cpp.extra_flags="-DUSE_MODBUS_SENSOR_MD02=1" +``` diff --git a/examples/opcua_server/opcua_server.ino b/examples/opta_opcua_server/opta_opcua_server.ino similarity index 100% rename from examples/opcua_server/opcua_server.ino rename to examples/opta_opcua_server/opta_opcua_server.ino From c550f146db5bc4c37f713c159ee3483c82474206 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Wed, 11 Sep 2024 09:35:22 +0200 Subject: [PATCH 2/4] Eliminate README by transferring compilation instructions and a short description to the head of the example sketch. --- examples/opta_opcua_server/README.md | 9 --------- examples/opta_opcua_server/opta_opcua_server.ino | 11 +++++++++++ 2 files changed, 11 insertions(+), 9 deletions(-) delete mode 100644 examples/opta_opcua_server/README.md diff --git a/examples/opta_opcua_server/README.md b/examples/opta_opcua_server/README.md deleted file mode 100644 index d24f385..0000000 --- a/examples/opta_opcua_server/README.md +++ /dev/null @@ -1,9 +0,0 @@ -:floppy_disk: `opta_opcua_server.ino` -===================================== - -### How-to-build Modbus MD02 demo -```bash -arduino-cli compile --fqbn arduino:mbed_opta:opta \ - examples/opta_opcua_server -v \ - --build-property compiler.cpp.extra_flags="-DUSE_MODBUS_SENSOR_MD02=1" -``` diff --git a/examples/opta_opcua_server/opta_opcua_server.ino b/examples/opta_opcua_server/opta_opcua_server.ino index 0c11e2f..451a466 100644 --- a/examples/opta_opcua_server/opta_opcua_server.ino +++ b/examples/opta_opcua_server/opta_opcua_server.ino @@ -1,3 +1,14 @@ +/* + * By compiling and uploading this sketch to your Arduino Opta you obtain turn your + * Arduino Opta into a networked OPC UA capable device. + * + * How-to-build/upload: + * arduino-cli compile --fqbn arduino:mbed_opta:opta examples/opta_opcua_server -v -u -p /dev/ttyACM0 + * + * How-to-build/upload RS485 Modbus Demo integrated with this sketch: + * arduino-cli compile --fqbn arduino:mbed_opta:opta examples/opta_opcua_server -v --build-property compiler.cpp.extra_flags="-DUSE_MODBUS_SENSOR_MD02=1" -u -p /dev/ttyACM0 + */ + /************************************************************************************** * INCLUDE **************************************************************************************/ From 04b8c45a10ecce7e28e39334e16d9b91745c2d99 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Wed, 11 Sep 2024 09:36:28 +0200 Subject: [PATCH 3/4] Fix incorrect name in description. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5e7760b..1f455e0 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,9 @@ This library provides an implementation of [OPC UA](https://en.wikipedia.org/wik Furthermore, the library supports automatic detection, configuration and exposure of up to two Arduino Opta Expansion Boards (i.e. Digital Expansion w/ mechanical relays [`D1608E`](https://store.arduino.cc/products/opta-ext-d1608e), Digital Expansion w/ solid-state relays [`D1608S`](https://store.arduino.cc/products/opta-ext-d1608e), Analog Expansion [`A0602`](https://store.arduino.cc/products/opta-ext-a0602)) via OPC UA. ### How-to-OPC UA -* Compile and upload [`examples/opcua_server`](examples/opta_opcua_server/opta_opcua_server.ino) +* Compile and upload [`examples/opta_opcua_server`](examples/opta_opcua_server/opta_opcua_server.ino) ```bash -arduino-cli compile --fqbn arduino:mbed_opta:opta -v examples/opcua_server -u -p /dev/ttyACM0 +arduino-cli compile --fqbn arduino:mbed_opta:opta -v examples/opta_opcua_server -u -p /dev/ttyACM0 ``` * Connect Arduino Opta Ethernet port with a [DHCP](https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol)-enabled router, switch, etc. * Open a serial monitor From 75ab2861553b25845b0f2d13063fbebe60ba3916 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Wed, 11 Sep 2024 09:40:15 +0200 Subject: [PATCH 4/4] Make it clear that instructions on memory tracing are intended for developers only. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1f455e0..03ce3bd 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,8 @@ python3 -m pip install --upgrade pyopenssl python3 -m pip install --upgrade . ``` -### How-to-enable detailed heap/stack memory debugging information +### Developer section +#### How-to-enable detailed heap/stack memory debugging information * Edit [`variants/OPTA/conf/mbed_app.json`](https://github.com/arduino/ArduinoCore-mbed/blob/main/variants/OPTA/conf/mbed_app.json) ```diff "target.macros_add": [