Skip to content

Commit

Permalink
Fix firmware instructions lab2
Browse files Browse the repository at this point in the history
  • Loading branch information
jaxsonp committed Sep 10, 2023
1 parent 4e0d931 commit f0c8076
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions book/labs/2_determine_heart_rate/lab2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,16 @@
"\n",
"### (Make sure to read the next steps carefully!!)\n",
"\n",
"Open up Thonny. [Follow the directions here](https://projects.raspberrypi.org/en/projects/getting-started-with-the-pico/3) to install the Micropython firmware on the Pico. The following page at that link has directions for testing to make sure it's working.\n",
"First, ask your TA for today's hardware and pull out your pico. Find the BOOTSEL button (see the below diagram), press and hold it down, and then plug in your pico while continuing to hold the button. After 5 seconds, you can let go of the button. Next, [click this link](https://micropython.org/resources/firmware/RPI_PICO-20220618-v1.19.1.uf2) to download the Micropython firmware. Navigate to your downloads folder, and find the `.uf2` file that was just downloaded and drag it into the pico folder, which can be found on the left side panel called `/RPI-RP2`. After a second or two, the pico should reboot, and the `/RPI-RP2` folder will go away. After a few more seconds, open up thonny, and press the button in the bottom right, which may say something like \"Python 3.x.x\", \"Micropython\", or \"Select interpreter\". A pop up window should come up, in that window select `Micropython`, then press done. The terminal in thonny will probably have an error at this point, if so just rapidly click the Stop/Restart button in the top bar, which looks like a red stop sign. If the red message doesn't go away after about 30 seconds of clicking, double check you followed the steps correctly, then ask your TA if the problem persists.\n",
"\n",
"Firstly, copy and paste [this code](https://raw.githubusercontent.com/TheDataScienceLabs/DSLab_Calculus/main/book/labs/2_determine_heart_rate/main.py) into thonny, and save it onto the Pico as `main.py`. Now, whenever you plug in the pico, it will run `main.py` automatically.\n",
"<div>\n",
"<img src=\"pico_bootsel.png\" alt=\"bootsel button diagram\" width=\"400\"/>\n",
"</div>\n",
"\n",
"Next up, run the following cell. This will download a folder called `max30102/` into your Downloads folder. After you have done that, pull up thonny, and on the top bar under 'View', select 'Files'. This will bring up a bar on the side that you can use to transfer the file onto your Pico. In this side bar, navigate to your Downloads folder (If you get lost, you can find it at `This Computer/home/shay/a/\"your username\"/Downloads`), right click the `max30102/` folder, then press 'Upload to /'. This will copy the entire folder onto your Pico."
"\n",
"Our next step is to copy and paste [this code](https://raw.githubusercontent.com/TheDataScienceLabs/DSLab_Calculus/main/book/labs/2_determine_heart_rate/main.py) into thonny, and save it onto the Pico as `main.py`. Now, whenever you plug in the pico, it will run `main.py` automatically.\n",
"\n",
"Then run the following cell. This will download a folder called `max30102/` into your Downloads folder. After you have done that, pull up thonny, and on the top bar under 'View', select 'Files'. This will bring up a bar on the side that you can use to transfer the file onto your Pico. In this side bar, navigate to your Downloads folder (If you get lost, you can find it at `This Computer/home/shay/a/\"your username\"/Downloads`), right click the `max30102/` folder, then press 'Upload to /'. This will copy the entire folder onto your Pico."
]
},
{
Expand Down Expand Up @@ -331,7 +336,9 @@
"| I2C0 SDA _(Pin 1)_ | SDA |\n",
"| I2C0 SCL _(Pin 2)_ | SCL |\n",
"\n",
"We have also provided some reference pictures below, but we encourage you to mainly rely on the table above, rather than the pictures. Ask a TA or a classmate if you have questions about the wiring. \n",
"You will also be provided with a small ceramic capacitor. This should be placed in between the GND and the 3V3(OUT) pins on the pico, in any orientation. _(see the third picture below)_\n",
"\n",
"While we have provided some reference pictures below, we encourage you to mainly rely on the table above, rather than the pictures. Ask a TA or a classmate if you have questions about the wiring. \n",
"\n",
"![sensor pins](https://github.com/TheDataScienceLabs/DSLab_Calculus/blob/main/book/labs/2_determine_heart_rate/sensor_pins.png?raw=true)\n",
"![wiring example](https://github.com/TheDataScienceLabs/DSLab_Calculus/blob/main/book/labs/2_determine_heart_rate/wiring_example.jpg?raw=true)\n",
Expand Down
Binary file added book/labs/2_determine_heart_rate/pico_bootsel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f0c8076

Please sign in to comment.