AgriQL · Embedded · Arduino

Install in the Arduino IDE or arduino-cli

AgriQLEdge is an ordinary Arduino library. It ships a precompiled core for each processor family, and the Arduino builder picks the one that matches the board you select. You do not need Rust or any other tool.

1. Install the board package

In Tools > Board > Boards Manager, install the package for your board, if it is not there already:

BoardBoards Manager package
UNO R4 Minima, UNO R4 WiFiArduino UNO R4 Boards
Nano 33 BLE, Nano RP2040 ConnectArduino Mbed OS Nano Boards
MKR WiFi 1010, MKR WAN 1310, Zero, Nano 33 IoTArduino SAMD Boards
Raspberry Pi Pico, Pico W, Pico 2Raspberry Pi Pico/RP2040/RP2350 (Earle Philhower)
ESP32-C3, ESP32-C5, ESP32-C6, ESP32-H2, ESP32-P4esp32 (Espressif)

The Pico and ESP32 packages need an extra Boards Manager URL in File > Preferences:

https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
https://espressif.github.io/arduino-esp32/package_esp32_index.json

2. Install the library

Arduino IDE 2: Library Manager

Open Sketch > Include Library > Manage Libraries, search for AgriQLEdge, and click Install.

The Library Manager listing is requested and appears after Arduino's registry accepts it. Until then, use the ZIP below. It is the same library.

Arduino IDE: ZIP file

  1. Download AgriQLEdge-3.10.1.zip from the latest release.
  2. Choose Sketch > Include Library > Add .ZIP Library and select the file.

arduino-cli

arduino-cli lib install AgriQLEdge

Before the listing appears, install from the repository instead:

arduino-cli config set library.enable_unsafe_install true
arduino-cli lib install --git-url https://github.com/Agriculture-Service-of-Product-Farm/AgriQLEdge.git

3. Compile the first example

Open File > Examples > AgriQLEdge > RamFlashDemo, select your board, and click Verify. With arduino-cli:

arduino-cli compile --fqbn arduino:renesas_uno:unor4wifi ~/Arduino/libraries/AgriQLEdge/examples/RamFlashDemo

Upload it and open the Serial Monitor at 115200 baud. It reads A0 every second and prints how many readings the last hour holds. The demo keeps the log in RAM, so it starts empty after a reset.

4. Keep readings across resets

Use a real flash driver. The library has two:

  • Esp32Partition: an ESP32 data partition named agriql. Add agriql, data, 0x99, , 256K, to a custom partitions.csv.
  • Stm32InternalFlash: the top of STM32L4 internal flash (STM32duino).

Any other board needs three short functions. See flash drivers.

If it does not compile

MessageCause
AgriQLEdge does not support AVR boardsAn UNO R3, Mega or Nano classic is selected. Choose a 32-bit board.
AgriQLEdge is not precompiled for the Xtensa ESP32A classic ESP32, ESP32-S2 or ESP32-S3 is selected. Use an ESP32-C3, C5, C6, H2 or P4.
undefined reference to agriql_edge_mountA third-party board package whose processor has no precompiled core. Open an issue with the board name.
uses VFP register argumentsA float-ABI mismatch in a third-party board package. Open an issue with the board name.