Connecting the Waveshare RP2040 with LoRa SX1726 - LCAS/auto_shepherd_communications GitHub Wiki

Connecting to the Board

  1. Plug the board into the device and identify the dev address (likely ot be /dev/ttyACM0)
  2. On the top bar, click on the drop down menu
  3. Identify the connection with the same address, it may appear as: Unconfirmed board (/dev/ttyACM0)
  4. On the popup, select the Waveshare RP2040 One, and the appropriate Serial Port (USB)
  5. The dropdown menu should now appear with the dev as the correct device type
  6. At this point, you can open the serial monitor at Tools > Serial Monitor
  7. On the serial monitor, you should now be seeing messages appearing

Writing to the Board

  1. Unplug the usb cable and open the board's case
  2. Find the button labelled BOOT and hold it down
  3. Whilst holding the button plug in the usb cable
  4. Leave it held for a second, then you can release the BOOT button
  5. If you open your file browser, you should now see a new USB drive named RPI-RP2
  6. In the Arduino IDE, you should now seethe Waveshare RP2040 One selected in the dropdown menu
  7. At this stage, the serial monitor should have a yellow box stating Not Connected...
  8. Paste the code from auto_shepherd_communications/simple_script.ino into the window
  9. Around line 19, add a unique device name to the script:
String deviceID = "my_unique_device_name";
  1. Click on the Upload icon in the top left of the IDE (the right-pointing arrow)
  2. 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
  1. The serial monitor should now be outputting messages again