run script at Thonny startup

93 views
Skip to first unread message

guy colin

unread,
Feb 2, 2021, 9:07:34 AM2/2/21
to thonny
Hello,
Is it possible to run a script when Thonny starts?
My idea is to sync the Pico time with the host computer
A script running on the host computer can do that as shown here
However the script must run before Thonny open /dev/ttyACM0 
I can do it outside Thonny with bash, but it would be smarter in Thonny
I did a quick read (yes quick only) of Thonny documentation but didn't find that.

Thanks
--
Thonny is great 

Aivar Annamaa

unread,
Feb 2, 2021, 1:01:01 PM2/2/21
to thonny
Hi!

Synchronizing time is already implemented in Thonny, but it's currently switched off for Pico, because at 3.3.3 release time Pico didn't have machine.RTC yet. It will be switched on in the next Thonny version (provided stable MicroPython for Pico is released by then).

If you want to switch it on in Thonny 3.3.3, then add respective configuration option (sync_time = True) manually into [RPiPico] configuration section (see https://github.com/thonny/thonny/wiki/MicroPython#advanced-configuration).

Best regards,
Aivar

guy colin

unread,
Feb 2, 2021, 1:20:06 PM2/2/21
to thonny
Thanks for your quick answer.
Ok let's wait until machine.RTC is implemented in the Pico MicroPython port.
let's be patient :-)

Reply all
Reply to author
Forward
0 new messages