

The error appears in the Shell window when you have a program that 'imports' a file and the file is not present on the Pico. The error box may also appear if you try to open a file whilst the Pico is running. If you try to save without stopping you may get this error box.
Thonny on chromebook code#
To change the code or save a new piece of code you may need to press the stop button. The following section has some of the more common errors.īecause the code has a while True: loop once you start the code it runs forever. This could be because an error has occurred and the Pico has tried to report it. If the Pico is running without the shell connected then it may appear to just stop. In general an error is reported into the Shell window, with a description of what the error means. There are many things which could go wrong when creating some code to run. The onboard LED should now be linking on and off at 1/2 second intervals Common Errors and Trouble Shooting: In Thonny shell you should see a message saying the editor content is running: We have the computer connected, so call the file blink.py This is useful if you want to write something that will run without having to connect a computer. If you call the file main.py then every time the Pico boots it will run the contents of main.py The Pico has a limited amount of storage, but plenty for most projects, so generally you should save your files on the Pico. Once a file has been saved Thonny remembers where it saved it and does not ask again. If your Pico is connected then Thonny will offer the option of saving it to the Pico or to your local computer. In the Thonny editing window create the following Code: The Pico has an LED near its USB connector which can be controlled from software. Thonny is an Integrated Development Environment (IDE), which combines code editing, debugging and programming into a single application.
Thonny on chromebook how to#
Now we have both the tools and the Pico ready the next part of this guide will show you how to create and run a simple program. Plug in your Pico with a micro USB lead to the computer before completing the rest of this guide. It should auto detect the Pico when it is plugged in. Thonny connects to the Pico to program it via the USB port.
Thonny on chromebook install#
Go to to download it and follow those install instructions. Thonny is a dedicated Python Editor which is used to send the working code to the Pico. To create the code to run on the Pico we need to install Thonny on your computer. Once it is plugged back in it will not appear as a USB memory stick, but Thonny will be able to connect to it via the USB port. Reboot your Raspberry Pi Pico by unplugging it. Download the UF2 and drop it onto the RPIRP2 drive. This will take you to the Pico webpage.Ĭlick on the Tab labelled “Getting Started with MicroPython” and follow the instructions.

On the USB drive is a weblink called “Index.htm” which you should click. Your Pico should appear as a USB drive called “RPI-RP2”. Hold down the “Boot Sel” button on your Pico.Ĭonnect the Pico to your PC using a USB Lead, then let go of the button. Getting setupįirst install micropython on the Raspberry Pi Pico: This guide is for MicroPython – a Python implementation for micro controllers, and uses the Thonny editor.

The Pico can be programmed in a number of languages.
