I tested with 100 ms (see here) and was always able to regain control. The solution is to make sure your application sleeps for several milliseconds in the main loop. If you are not careful, your application’s main loop can prevent you from regaining REPL control. I had no problems using the REPL manually, but I discovered an issue once you start testing self-starting applications with forever loops. For the systems I tested, the configuration file can be found in the following places:Ĭ:\Users\\AppData\Roaming\Thonny\configuration.ini The e means East, and other compass points like se can be specified as well. This is done by adding ShellView.location = e to the section of the configuration.ini file (see here). If you’re using a modern wide-screen monitor, you will probably want to rearrange the windows in Thonny so the editor and shell are side-by-side (see the feature image). Tweaks Thonny Connection Screenīy default, Thonny’s windows are stacked vertically. Fill in the WebREPL URL and password - you should connect and be good to go. This is the normal method of enabling WebREPL in general - if your module already has WebREPL setup, you don’t need to change anything. Note that you have to connect to your module over USB first and make sure that WebREPL is enabled in boot.py. Here you pick which type of module to use, and which interface (USB or WebREPL). In order to connect to a module, you will use the Run -> Select interpreter. Rather than building from source, I used the provided Linux installation script that downloads and installs the latest release. Doing a sudo apt update, sudo apt upgrade, and then reinstalling Thonny resulted in the latest version 3.3.6.įor some reason, the Thonny found in the Ubuntu 20.04 and Debian Buster package repositories also weren’t recent enough. On an older Pi 3 however, Thonny was too old and simply reinstalling it didn’t work for me. If you have a Raspberry Pi, you will find Thonny is pre-installed - version 3.3.3 was found on a recent Pi 4 in my lab. For Linux and Mac simply doing sudo apt install thonny or brew install thonny was all I needed. There is a downloader link at the top of the page for Windows. Instructions are clearly given on the project’s website. Although this is a new feature and classified as experimental, I found it reasonably stable to use and more than adequate for home lab use. Leaning about Thonny got me curious, and after a little digging I discovered that it has WebREPL support for MicroPython right out-of-the-box. If you read about the project and its development, you’ll see that he’s put a lot of effort into making Thonny, and it shows. Thonny was designed to address common issues observed during six years of teaching Python programming classes to beginners. Thonny was introduced in 2015 by Aivar Annamaa of the University of Tartu in Estonia. Bill was using Thonny, a Python IDE that is popular in the education community. I had all but given up when by chance I saw this video on the Dronebot Workshop channel about running MicroPython on the new Raspberry Pi Pico boards. mentioned in a recent podcast that he’s using telnet to access his wireless nodes, but he’s using esp-link on an ESP8266, which means throwing another chip into the mix. While its functional, it just didn’t strike my fancy for some reason. Being lazy, I want to tinker with my ESP32 modules from the sofa, not drag my laptop into the kitchen or balcony to plug up a USB cable. įor over a year, I have been quite happy with rshell until I started working on these wireless nodes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |