We're going to get started with the Fire-EdUp Platform and begin calculating Fire Danger Level, and Fire Behaviour Index.
To follow along you'll need:
- A Fire-EdUp Platform
- A Micro-USB Cable
- A Computer with Thonny installed.
The video below will walk you through getting started. You might like to refer to this written article for some of the finer points.
If you need help setting up Thonny, we've prepared a great guide to get you started there. That guide also covers installing MicroPython onto the Raspberry Pi Pico which drives the Fire-EdUp platform. Your Platform is already running MicroPython so you won't have to perform this step, but it's a handy reference if you wish to install or upgrade MicroPython again later.
Download the MicroPython Files and Examples
- Click this source code link to download the Fire-EdUp drivers and examples.
- Unzip the .zip file
- Store the contents somewhere safe where you can easily find them - like My Documents
Note: If you would rather download the files individually, you can find them in the Fire-EdUp GitHub Repository. This won't be necessary for most users unless you want to inspect the files before downloading.
First steps with Thonny
Connect to the Pico and upload MicroPython modules
Launch Thonny and make sure you can see the file pane, and the shell. You may also like to enable the plotter for later.
Navigate to where you stored your files and enter the modules directory. You can navigate by clicking anywhere in the light blue file path at the top of the file pane.
These file names may change in the future but don't worry, the process is the same.
Connect your Fire-EdUp Platform to your computer via the USB cable.
Click the text at the bottom right corner of the window (1) to reveal the interpreter settings. Select the entry labelled "Raspberry Pi Pico" (2). Alternatively, access the full settings by selecting "Configure Interpreter"
You should see the file pane displaying your connected Raspberry Pi Pico! Now we'll upload all the files to the Pico.
Select all the files;
- Left-click the top file
- Hold the Shift key on your keyboard
- Left-click the bottom file
Right-click and select "Upload to /"
After the upload completes you will see the same files now copied and stored on the Raspberry Pi Pico.
We have now prepared the Fire-EdUp Platform with the driver files it needs to operate the on-board hardware.
Run the first example
Navigate the top file pane into the examples directory and open example1.py
This is the basic operation of the Fire-EdUp Platform. Click the green run button to run the code.
Select a Different Model
The valid model list.txt file contains a list of names that can be used by firedup.model
The models account for how fires behave under different climates and biomes. Observe the Fire Behaviour Index (FBI) under certain operating conditions, and re-run the simulation using a differnet model. To use the new model, modify the code where firedup.model is assigned.
Observe how changes in slope affect Fire Behaviour
Fires travel more readily uphill than across flat terrain. Compare two different slope_degrees setpoints.
Running code without connecting to a computer
So far we've run the example code while tethered to a computer. If you would like to upload the code to your Fire-EdUp platform so that it runs the code automatically on power-up (and without a computer) then you can simply save the example as to your Raspberry Pi Pico, using a special name.
Select File -> Save as... to save the currently opened file. When prompted, select "Raspberry Pi Pico" as the destination and name the file: main.py
Now your Fire-EdUp Platform will begin operating whenever it is connected to a power source eg. a USB charger or battery bank.
Now that your Fire-EdUp Platform is running code, we can begin implementing our own tweaks and changes. Continue on to the next article where we will write some new code to activate the audible alert.
If you need to re-install MicroPython onto your Pico for whatever reason, you can always refer to our Raspberry Pi Pico Workshop.
If you're at school, you can always ask a teacher or a friend for help. If you're in a makerspace, ask your program coordinator. Otherwise, you're welcome to leave a comment on this article or post a thread in our forums. We're full-time makers and happy to help. Try to be as descriptive as you can, including screenshots, a copy of your code, and a copy of what appears in the Thonny shell.