Open tmplt opened 3 years ago
Data can (and have been reported by others) be read via the UART pins on the RPi with the same baud rate as over USB UART. However, the hardware does not play ball with NixOS: while the expected /dev/ttyAMA0
is available when booting with boot.kernelPackages = pkgs.linuxPackages_rpi3
, a simple loopback test (bridge UART RX and TX pins) does not pass. For now we'll read data over the USB UART interface: /dev/ttyACM0
.
enable_uart=1
in /boot/config.txt
without any effect. Do we have to specify force_turbo=1
also?boot.kernelParams lib.mkForce [];
was set. Does that cause issues?
Measured position data can be extracted in two a few ways:
minicom -D /dev/ttyACM0 -b 115200
, pressing enter twice we get a CLI. Enteringlep
prints the measured position each tick IF we are communicating with at least three anchors. The commandles
behaves similarly, but also prints which (and thus how many) anchors the data was derived from.lep
prints data on the formPOS,X,Y,Z,Q
, whereQ
is a quality factor.Of the above, data via the board's GPIO is the preferred method as communication will likely be similar to that of the BrickPi3; We should be able to just stack the components upon the Pi, and drive them all via the barrel connector of the BrickPi. If this approach fails/takes too long to implement, we can readily read the data over USB.
While the Raspberry Pi has Bluetooth capabilities, reading the data with that approach is a bad idea: position data will be greatly outdated when we receive it, and the delay is not predictable.