Skip to content

Commit 6062206

Browse files
authored
Merge pull request #430 from arduino/x8-python-m4-clarifications
2 parents aa5bf2e + a1f251e commit 6062206

File tree

1 file changed

+3
-3
lines changed
  • content/hardware/04.pro/boards/portenta-x8/tutorials/python-arduino-data-exchange

1 file changed

+3
-3
lines changed

content/hardware/04.pro/boards/portenta-x8/tutorials/python-arduino-data-exchange/content.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Make sure you've installed the "Arduino Mbed OS Portenta Boards" core and upload
6767

6868
### Debugging the Arduino Sketch
6969

70-
To check if the Arduino sketch is working correctly you may want to read the messages from the `Serial.println` statements. You can't currently read them directly in the serial monitor of the Arduino IDE. Instead, you can use a simple service called `py-serialrpc` which listens for those messages and prints them to the console. This service needs to run on the Linux side of the X8. You can get the files [here](assets/py-serialrpc.zip). Upload them to the X8 with `adb push py-serialrpc /home/fio`.
70+
To check if the Arduino sketch is working correctly you may want to read the messages from the `Serial.println` statements. You can't currently read them directly in the serial monitor of the Arduino IDE. Instead, you can use a simple service called `py-serialrpc` which listens for those messages and prints them to the console. This service needs to run on the Linux side of the X8. You can get the files [here](assets/py-serialrpc.zip). From the command prompt of your local machine, navigate to the adb tool folder and upload the files to the X8 with `adb push <local directory path>/py-serialrpc /home/fio`.
7171

7272
Log into the X8 shell with `adb shell` and navigate into the `serialrpc` folder. Build the container using `sudo docker build . -t py-serialrpc`. The `-t` flag assigns a tag to the container. Then run the container by executing `cd..` and then `sudo docker-compose up -d`. The `-d` flag detaches the container so it runs in the background. Note that this will run the docker container persistently across reboots by registering it as a systemd service. To stop the container, run `sudo docker-compose stop`.
7373

@@ -85,7 +85,7 @@ rpc_client = RpcClient(rpc_address)
8585
temperature = rpc_client.call('temperature')
8686
```
8787

88-
The files for the complete Python® application can be found in the same package as the Arduino sketch (see above). Upload the `python-sensor-rpc` folder to the X8 via `adb push python-sensor-rpc /home/fio`. Log into the X8 via `adb shell`. Then navigate into the `python-sensor-rpc` folder and execute `sudo docker build . -t python-sensor-rpc`. When it's done you can run the container with `sudo docker-compose up`. After a few seconds you should see the output from the Python® application featuring the sensor readings on the M4 that were piped through the RPC mechanism. The output should look similar to the following:
88+
The files for the complete Python® application can be found in the same package as the Arduino sketch (see above). Like in the previous step, upload the `python-sensor-rpc` folder to the X8 via `adb push <local directory path>/python-sensor-rpc /home/fio`. Log into the X8 via `adb shell`. Then navigate into the `python-sensor-rpc` folder and execute `sudo docker build . -t python-sensor-rpc`. When it's done you can run the container with `sudo docker-compose up`. After a few seconds you should see the output from the Python application featuring the sensor readings on the M4 that were piped through the RPC mechanism. The output should look similar to the following:
8989

9090
```
9191
python-sensor-rpc_1 | ============================================
@@ -120,4 +120,4 @@ In this tutorial you learned how to use the docker infrastructure to build a con
120120
### Next Steps
121121

122122
- You may now further process the data that you receive from the Arduino sketch and e.g. upload it to a cloud service or similar.
123-
- Familiarize yourself with Docker commands to adjust the docker configuration to your needs.
123+
- Familiarize yourself with Docker commands to adjust the docker configuration to your needs.

0 commit comments

Comments
 (0)