Restart m5stickC from micro python



  • I am using MQTT to communicate between two m5stickC's.
    It seems that you need to use the download option when using MQTT.
    To change the code you then seem to have to reset the device using the left button, then quickly press the right button to get back into the cloud download mode.

    Is it possible to programatically cause the restart to happen, and also to go into the cloud download mode automatically - so that I can send a specific MQTT message to the device to tell it to get ready for the next download?



  • Hi @dwuk we've confirmed with our engineers and for the MQTT no need to use the download option, without the download it should work just fine as well just using the "run" function. if you are having any more issues, please let me know.



  • Great thanks - didn't try play due to this comment in the documentation
    "MQTT program must be downloaded to use!"

    Have tried it and play seems to work ok. I seem to have to reset the device though to download a new version of the code, but the good news at that after reset it goes back ok into the cloud connect mode ready to receive a new version.

    I have found that I can do this - programatically using
    import machine
    machine.reset()

    Just wondering if there is a way to avoid having to do this step when operating in play mode.