Connecting the Waveshare RP2040 with LoRa SX1726 - LCAS/auto_shepherd_communications GitHub Wiki
Connecting to the Board
- Plug the board into the device and identify the dev address (likely ot be
/dev/ttyACM0
)
- On the top bar, click on the drop down menu
- Identify the connection with the same address, it may appear as: Unconfirmed board (/dev/ttyACM0)
- On the popup, select the Waveshare RP2040 One, and the appropriate Serial Port (USB)
- The dropdown menu should now appear with the dev as the correct device type
- At this point, you can open the serial monitor at
Tools > Serial Monitor
- On the serial monitor, you should now be seeing messages appearing
Writing to the Board
- Unplug the usb cable and open the board's case
- Find the button labelled
BOOT
and hold it down
- Whilst holding the button plug in the usb cable
- Leave it held for a second, then you can release the BOOT button
- If you open your file browser, you should now see a new USB drive named
RPI-RP2
- In the Arduino IDE, you should now seethe Waveshare RP2040 One selected in the dropdown menu
- At this stage, the serial monitor should have a yellow box stating
Not Connected...
- Paste the code from auto_shepherd_communications/simple_script.ino into the window
- Around line 19, add a unique device name to the script:
String deviceID = "my_unique_device_name";
- Click on the
Upload
icon in the top left of the IDE (the right-pointing arrow)
- In the Output window th the bottom of the IDE, you should see an output such like:
Sketch uses 87868 bytes (2%) of program storage space. Maximum is 4190208 bytes.
Global variables use 10760 bytes (4%) of dynamic memory, leaving 251384 bytes for local variables. Maximum is 262144 bytes.
Resetting /dev/ttyACM0
Converting to uf2, output size: 209920, start address: 0x2000
Scanning for RP2040 devices
Flashing /media/james/RPI-RP2 (RPI-RP2)
Wrote 209920 bytes to /media/james/RPI-RP2/NEW.UF2
- The serial monitor should now be outputting messages again