The MacArthur HAT (Hardware Attached on Top) is a specialized expansion board designed for the Raspberry Pi, primarily used in marine and outdoor applications. It integrates various sensors, including GPS, 9-axis IMU (accelerometer, gyroscope, and magnetometer), barometer, and temperature sensors. This HAT enables the Raspberry Pi to collect comprehensive environmental and navigational data, making it ideal for marine electronics projects, weather stations, and IoT applications. Its compatibility with NMEA 2000 networks and Signal K platforms enhances its utility in modern marine systems, allowing easy integration with other onboard electronics and data-sharing capabilities.
sudo raspi-config
.sudo reboot
.sudo apt update sudo apt upgrade -y
sudo apt install -y git cmake build-essential libgps-dev gpsd gpsd-clients python3-pip
sudo pip3 install macarthur-hat
nano ~/test_macarthur.py
from macarthur_hat import MacArthurHAT import time hat = MacArthurHAT() while True: print(hat.read_all()) time.sleep(1)
python3 ~/test_macarthur.py
sudo pip3 install pycanboat
nano ~/nmea2000_reader.py
import can from pycanboat import PGNs bus = can.interface.Bus(channel='can0', bustype='socketcan') pgns = PGNs() for msg in bus: decoded = pgns.decode(msg) if decoded: print(decoded)
python3 ~/nmea2000_reader.py
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - sudo apt install -y nodejs
sudo npm install -g signalk-server
signalk-server-setup
signalk-server
Open a web browser and navigate to
Go to Server > Plugin Config.
Install and enable the following plugins:
signalk-macarthur-hat signalk-canboat-parser Configure the plugins:
For signalk-macarthur-hat, set the update interval and select the sensors you want to use. For signalk-canboat-parser, set the NMEA 2000 interface (usually /dev/ttyUSB0 for Actisense NGT-1).
Restart the Signal K server:
sudo systemctl restart signalk.service
Navigate to your web browser.