Brain: Service

Brain: Service #

view - Documentation

The Zakhar service provides access to the robot status and the CAN bus network.

The service prints information onto an ssd1306-based 128x32 OLED display connected to /dev/i2c-1:

The service publishes status information and incoming CAN messages to ZeroMQ subscribers. It also provides a ZeroMQ service to send CAN messages to the CAN bus.

The service allows all TCP connections including connections from external machines. See brain_pycore for compatible subscriber and client implementation classes.

Requirements #

OS and Hardware #

The service is supposed to be run on Raspberry Pi 4 with a Debian-like Linux (e.g. Raspberry OS). The OS should be initialized with the init script:

sudo bash scripts/init/

The script will create a zakhar directory in the system root and prepare the robot environment.

The service expects to see an I2C 128x32 display with the ssd1306 controller. E.g. this one. The display should be connected to /dev/i2c-1.

Python #

The service is written in python 3, so it requires Python > 3.5

The service requires several python packages:

You can install the last four packages using pip and pypi. brain_core should be installed from the repository:

pip install git+

Installation #

To install the service run the installation script as root:

sudo bash scripts/

Connections #

Robot status publisher5557status
CAN received msgs publisher5556can_rcv
CAN send message server5566n/a