readme: added build instructions
This commit is contained in:
parent
0425836642
commit
c1db9cb7f4
1 changed files with 24 additions and 0 deletions
24
README.md
24
README.md
|
|
@ -8,6 +8,30 @@ A firmware for the Raspberry Pi Pico W to grab data from a few environmental sen
|
|||
|
||||
I dunno, cause I wanted to play with these sensors and keep track of the air quality in my room. But eCO2 is pretty inaccurate, and I suspect I have a fake ENS sensor because the readings seem almost random.
|
||||
|
||||
## Instructions
|
||||
|
||||
### Prep
|
||||
|
||||
You need to have the pico-sdk installed. I have it installed in ~/workspace/rp2040/pico-sdk and this is currently hard-coded into CMakeFiles.txt. I'm not sure if exporting an environment variable overrides this by default, but you can always just edit it to point to wherever you have it installed.
|
||||
### Build
|
||||
|
||||
Create a new directory in the project called build. Move into that directory and run:
|
||||
|
||||
```
|
||||
cmake ..
|
||||
make
|
||||
```
|
||||
and if you have a picoprobe or RasPi debug probe installed (or other CMSIS-DAP compatible probe) you can then directly write to the Pico with
|
||||
```
|
||||
make flash
|
||||
```
|
||||
or, you can hold down the BOOT button on the Pico W while plugging it in. It will appear as a USB drive. Then copy the ensaht.uf2 file from the build/ directory to that USB drive. It'll take a second, then it'll disappear. You may need to manually reset the Pico (or unplug/replug it). Open a serial terminal (I used to recommend minicom until I found tio, which is much better), probably something like
|
||||
|
||||
```
|
||||
tio /dev/ttyACM0
|
||||
```
|
||||
and it will print out sensor values. It will also log these to whatever MQTT server you have set up, assuming it was able to connect to Wi-Fi. And that's it!
|
||||
|
||||
## License
|
||||
|
||||
Unlike most software I write, this is released under MIT instead of under MPL. So, follow the MIT license if you wanna reuse it!
|
||||
Loading…
Add table
Add a link
Reference in a new issue