Skip to content

Problem with Saving MQTT Payload Data to CSV or TXT File from Portenta X8 #1432

@marimelhanafy

Description

@marimelhanafy

Hello everyone,

Following tutorial no. 12 (https://docs.arduino.cc/tutorials/portenta-x8/multi-protocol-gateway), I've encountered an issue with saving data from the Python code to a csv or even a txt file.
I'm using an ESP32, which sends the data to the Portenta X8 that's connected to the Max carrier. When I run the code, the data is received and printed, but it's not saved to the file. Could the problem be related to the Arduino and Linux layers?

Here's the data being successfully sent from the ESP32 to the Portenta X8:
image

Here is the modification I made to the part of the code:
image

I tried using f.write(str(float(decoded_mqtt_payload))) and f.write('hello'). However, both attempts did not work, and the resulting file is totally empty.

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions