Thonny will automatically download and install our latest firmware version from the Internet. Select this option and then find the appropriate firmware in the list: Get the robot into bootloader mode as described in Section 5.1, and you will see an “Install MicroPython” option in the Thonny’s interpreter menu: Thonny is supported on three main platforms. You can also upgrade the MicroPython firmware with Thonny. Let’s get started by looking at how to install Thonny. Make sure you have anything you are working on backed up before you proceed. Note: Loading a firmware file will delete all programs and data stored on your robot. To start the demo program, press Ctrl+C (to stop the running program) then Ctrl+D (“soft” reboot). If you save your changes, you will be able to access them from the demo menu system later. Make some modifications and see that the blink pattern changes. Installer with 32-bit Python 3.8, suitable for all Windows versions since 7 thonny-p圓8-4.1.4.exe (20 MB) Portable variant with 64-bit Python 3.10 thonny-4.1.4-windows-portable.zip (31 MB) Portable variant with 32-bit Python 3.8 thonny-p圓8-4.1.4-windows-portable.zip (29 MB) Re-using an existing Python installation (for advanced users) pip. Try that now and run the code again with the Run button or F5. Thonny is an Integrated Development Environment (IDE) designed to make it easier for beginners to create and run Python Code. To stop the program you can press Ctrl+C. Assuming you are still connected and see the MicroPython prompt, you can click the green Run button at the top or press F5 to run it immediately. Next, open blink.py in the Thonny editor. If basic commands work, you can try using the hardware on the 3pi+: You can program the board as a Pico or generic RP2040 board, but there will be more confusing options for file loading and saving. Note: If Thonny does not show the “Pololu 3pi+ 2040 Robot” option here, something is wrong with the plugin install. Next, you can try typing some commands in the Shell window: (If it doesn’t connect or isn’t showing any output, try clicking “Stop” to get connected.) Using Thonny to interact with the MicroPython interpreter Your currently-running program on the 3pi+ will stop, and the “Shell” window will show a MicroPython prompt (“REPL”). You should be able to select an option for the 3pi+ from the interpreter menu in the lower-right corner of Thonny: Next, connect your robot to your computer with a USB cable. ![]() Its one of the robust, feature-rich online compilers for python. Important: Restart Thonny after installing the plugin. Write, Run & Share Python code online using OneCompilers Python online compiler for free. Search for “ thonny-pololu”, select the corresponding plugin from PyPi, and click “Install”: Start the program, open the Tools menu, and click “Manage plug-ins…”: ![]() Your Thonny editor window should look like this). Install the latest version from the Thonny website. In this course, well edit and run our Python code using Thonny. Installing Thonny and connecting to the 3pi+ ![]() After you download Thonny and install our plugin as described below, Thonny will recognize the 3pi+ and help you interact with the MicroPython interpreter running on its control board. Thonny is a Python editor for beginners that also includes advanced IDE features for editing and debugging code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |