UWB Q1

Receive UWB Position Data with Arduino Uno (AltSoftSerial Example)

This guide connects a GrowSpace UWB listener or developer tag to an Arduino Uno and receives real-time position data with the lep command. An AltSoftSerial example is included.

Position coordinates shown in the Arduino Uno serial monitor

About this article

This article shows how to connect a GrowSpace UWB listener or developer tag to an Arduino Uno and receive real-time position data with the lep command. The Uno has just one hardware serial port, so this example uses AltSoftSerial, a software serial library, to handle the data reliably.


What you need


Install the Arduino IDE and library

Install the Arduino IDE

Install AltSoftSerial

  1. Run the Arduino IDE
  2. In the top menu, go to Sketch > Include Library > Manage Libraries
  3. Search for AltSoftSerial and install the latest version

Why do you need AltSoftSerial?

The Arduino Uno has one default hardware serial (Serial) port, which is connected to the USB port. GrowSpace UWB devices need high-speed serial communication at 115200bps, so the default port of the Uno alone has difficulty handling two-way communication between the PC and the device at the same time.

Limits of the standard SoftwareSerial

Advantages of AltSoftSerial

For this reason, we recommend AltSoftSerial to connect GrowSpace devices to an Uno board reliably.


Serial pin wiring (AltSoftSerial)

Connect the GrowSpace device and the Arduino Uno as follows. The Uno can connect to a 5V device, so use the right connector (5V).

GrowSpace device pinArduino Uno pin
HV (5V)5V
GNDGND
TXDD8
RXDD9

⚠️ You must cross-connect TX ↔ RX. Device TX → Uno D8 (RX of AltSoftSerial). Device RX → Uno D9 (TX of AltSoftSerial).


Example code: receive data with AltSoftSerial

#include <AltSoftSerial.h>

AltSoftSerial altSerial;  // RX: D8, TX: D9

void setup() {
  Serial.begin(115200);     // USB serial
  altSerial.begin(115200);  // GrowSpace device serial
  delay(100);

  // Reset the device
  altSerial.print("reset\r");
  delay(1000);

  // Clear the buffer
  while (altSerial.available()) {
    altSerial.read();
  }

  // Start the position request
  altSerial.print("lep\r");
}

void loop() {
  while (altSerial.available()) {
    char c = altSerial.read();
    Serial.write(c);  // Print to the PC
  }
}

Serial monitor settings and test

Output examples (same for developer tag and listener)

POS,0,0104,12.34,56.78,9.01,95,BC

Arduino Uno integration, output example (developer tag and listener) screen 3

or

X: 12.34, Y: 56.78, Z: 9.01

Arduino Uno integration, output example (developer tag and listener) screen 4

When position data is received from the GrowSpace device normally, values like the ones above are printed.


Troubleshooting


Summary

This manual showed how to connect a GrowSpace UWB listener or developer tag to an Arduino Uno and receive real-time position data. The position information received with the lep command can be applied to a variety of indoor positioning projects and RTLS systems.