Arduino GPS and Compass Support
Sense
provides a micro controller, Bluetooth, a 6DoF IMU, and a magnetometer (a LIS3MDL). The FeatherWing
provides a GPS.
FeatherWing
to the Sense
. Add support for the nRF52 to the Arduino IDE. Then, add the board - it’s the Adafruit nRF52840 Sense
. The Arduino IDE will probably need to also install the nRF core library (adafruit:nrf52@1.6.1
). You should now be able to connect to the board.
Adafruit GPS library
Adafruit LIS3MDL
Adafruit_LSM6DS
/system_hw_test/gps_mag
. It yields all the data for tilt compensated magnetic heading, a full AHRS solution (yaw, tilt, roll) and a GPS location, as well as altitude and velocity.
WARNING The direction and AHRS data will be entirely incorrect unless you calibrate your magnetometer, gyro, and accelerometer.
/system_hw_test/gps_mag.ino
, see:
gap_mag.ino
:
src/inputs/plugins/serial_reader
for an example of how to do that.
/dev/ttyACM0
(sometimes the number can be different, for example /dev/ttyACM1
). Run:
sudo dmesg
and looks for entries with “Arduino” in it. This way you will easily spot the serial device name of your Arduino. You can read the data with:
/dev/ttyUSB0
. The TurtleBot4 assumes that the RPLIDAR is accessible at /dev/ttyUSB0
. If you change which USB port the LIDAR is plugged into, the LIDAR will fail.
/dev/cu.usbmodem8401
. Even on a mac, you can use screen
to see the data: screen /dev/cu.usbmodem21201 115200
RTCM
messages over XBee or the internet, and uses those data to correct (and greatly improve) its location estimate. The simpleRTK2B
has two usb ports, one labeled power + GPS
and the other power + XBee
. The first port provides a full set of NEMA and UBX messages, including GPGGA, GNRMC, GNGLL, and UBX(NAV-PVT). The power + XBee
port provides direct access to received RTK correction messages, such as 1005
and 1074
. In standard usage, a rover would use the NEMA messages to track its location whilst monitoring the status, mode, and quality fields.
A
) using RTK mode with fixed integers (posMode=R
)
pygpsclient
: