Welcome to Python Gateway programming manual

The Python Gateway is a Swiss army knife for connecting NMEA 0183 and NMEA 2000 devices. It is equipped with two serial ports (one for receiving NMEA 0183 data and one for transmitting), a CAN bus interface (for NMEA 2000) and a USB port for connection to a PC. The USB port provides two interfaces simultaneously: a virtual disc for uploading user programs, and a serial port with interactive Python prompt (REPL) for debugging or monitoring user code execution.

The Gateway hosts MicroPython (www.micropython.org), a popular implementation of the Python 3 programming language that includes a small subset of the standard Python library. The Gateway allows the creation of gateways between NMEA 0183 and NMEA 2000, at UART and CAN bus level using the standard Python library, or at NMEA level using the Yacht Devices library. It also allows NMEA 0183 devices operating at different speeds to be connected, and data to be processed, filtered and modified on the fly.

The Gateway’s processing power is limited, and you may not be able to use resource-intensive libraries popular on the PC, such as numpy, and you may find it difficult to port code with the long list of imports designed for the PC. However, you will have all the flexibility and power of the Python language, and the Yacht Devices library allows you to create tiny and elegant programs. For example, AIS decoding from NMEA 0183 to NMEA 2000 takes about 1.5 milliseconds per message. The performance is therefore sufficient for real-time applications.