Skip to main content

Raspberry Pi library for working with Amperka Octoliner line sensor board

Project description


A library for Raspberry Pi to interface with the Amperka Octoliner 8-channel line sensor.


Open the terminal on your Raspberry Pi and use pip to install the library:

pip3 install octoliner

If you haven’t enabled I²C support in your Raspbian Linux yet, run the configuration tool to turn it on:

sudo raspi-config

Then: Interfacing Options → I2C → Yes (enable) → Yes (autoload) → <Finish> → Yes (reboot). The setting preserves across reboots.

Testing connection

$ python3 -m octoliner
# Ctrl+C to exit


Quickstart example:

import time

# Import the class required
# from the library octoliner
from octoliner import Octoliner

# Sensor on the standard bus and address
octoliner = Octoliner()

# Lower sensitivity to 80%

while True:
    # Read all channel values
    values = [octoliner.analog_read(i) for i in range(8)]

    # Print them to console

    # Repeat forever, twice per second

See full API reference in

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

octoliner-2.1.0.tar.gz (6.3 kB view hashes)

Uploaded source

Built Distribution

octoliner-2.1.0-py3-none-any.whl (19.5 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page