This code run on a raspberry pi. It reads the coordinates from the UWB through serial port and store them in a remote database.
+--------------------------------------------------+
| |
+----------------+ | +----------------+ +------------+ |
| | | | | | | |
| Database | | | Raspberry PI | serial | Decawave | |
| (PostGreSQL) | <--------+ | (Linux) | <------+ | device | |
| | | | | | | |
+----------------+ | +----------------+ +------------+ |
| |
AWS | WLAN |
| |
+--------------------------------------------------+
This package requires node 8+ and yarn. ForeverJS should also be used on the raspberry pi, so that the service can be restarted after a crash.
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
npm i -g forever
DWM1001 TWR Real Time Location System.
There are two ways to connect to the Decawave HW: UART or SPI.
This project uses the UART through /dev/ttyACM0
It then enters the shell mode by printing 2 CR in less than one second and send
the lec
command to listen to the positions.