diff --git a/README.md b/README.md index 5ae0971..3b025ae 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,35 @@ will be useful to someone. Eventually I plan to build this out by adding more sensors, a proper enclosure, and an external solar/battery power-source. +### Build Instructions + +Note I'm new to `cmake` so have really just kludged this together for the moment, however this seems to work for me: + +1. Install/setup the Pico SDK and ensure the PICO environment vars are set up: `PICO_SDK_PATH`, `PICO_EXAMPLES_PATH`, `PICO_EXTRAS_PATH`, `PICO_PLAYGROUND_PATH` (I don't know if they're all needed) +2. Check out the [Melopero Perpetuo LoRa](https://github.com/melopero/Melopero_Perpetuo_Lora) project. +3. Check out this project and `cd` to the project root +4. Edit the `CMakeList.txt` to point to the correct Melopero Perpetuo LoRa `src` path! +5. `cd` to the `src` directory. +6. `mkdir build` +7. `cd build` +8. `cmake ../.. -DPICO_PLATFORM=rp2350` +9. `make` + +There should now be the files `sender.uf2` and `receiver.uf2` in the `src` directory (under the `build` directory you're currently in). Then copy these onto the boards... + +1. With no power (i.e. battery unplugged) plug your Melopero Perpetuo LoRa board into your computer via USB whilst holding down the "BT" button, then, for example: +2. `sudo mount /dev/sdb1 /mnt/tmp` +3. `sudo cp src/receiver.uf2 /mnt/tmp/` +4. `sync` +5. `sudo umount /mnt/tmp` + +In your case you may well have a different device than `/dev/sdb1` and `/mnt/tmp` is just my choice of path, this can be whatever you want. + +After this is run you should be able to attach to the USBTTY to view the serial output, in my case: + +* `minicom -D /dev/ttyACM1 -b 115200` + +In terms of finding the correct devices above `dmesg` is your friend. ### Disclaimer