In this page you will find links to various tutorials that cover many topics that were out of the scope of the main tutorials page.

Quick access list

Advanced tutorials and special cases

Special cases

  • Composite devices: Some devices may also implement the Iocard interface. These devices are called composite devices. They allow the user to get more complex devices while still having the simplicity of the hardio API. A good example of a composite device is the Powerswitch. This topic is covered by the composite devices tutorial.

  • Advanced buses: Some buses need to use other buses to communicate. A good example of such a bus is the modbus, wich uses an underlying Serial or UDP interface to function properly. The advanced buses tutorial will help you understand this topic.

  • Motors: Motors are a special case of generic device becaus they do not rely on an underlying device implementation to work. The motors tutorial will explain this special case.

Advanced tutorials

If you are expanding the functionnalities of the Hardio framework you might want to add new types of buses or devices. The tutorial about creating new buses covers all you need to know to define a new type of bus as well as the device type that goes with it.

Setup a RaspberryPi for hardio

Installing the operating system

You can install many linux distributions on the RaspberryPi. In this tutorial, we chose to install Rasbian.

How to setup rasbian

Changing the linux kernel to RT linux

After instaling the operating system, we should change the kernel to apply the PREEMPT_RT patch.

How to install RT linux

Install the RasberryPi toolchain

It is recommended to setup a toolchain that will allow you to compile your projects on your computer.

How to install the RaspberryPi toolchain

Another way is to get binaries directly from a repository. For example, this project contains a recent GCC binary for raspberry pi, with tutorials to use it:

Robot architecture overview

The architecture of the robot favors reusability of the code and better encapsulation of each project.

How the architecture works

Framework categories

If you want to add a package to the hardio framework, here is the list of all available categories for the documentation:

  • core: core libraries
  • generic: all generic devices implementations
  • generic/imu: alldevices that implement the generic IMU interface
  • generic/pressuresensor: all devices that implement the generic pressuresensor interface
  • generic/thermometer: all devices that implement the generic thermometer interface.
  • generic/watersensor: all devices that implement the generic watersensor interface.
  • iocard: all Iocard implementations
  • bus: all packages that implement various types of buses
  • bus/modbus: all packages that provide a modbus implementation
  • bus/i2c: all packages that provide an I2C implementation
  • bus/pinio: all packages that provide a pinio implementation
  • bus/serial: all packages that provide a serial implementation
  • bus/udp: all packages that provide a UDP implementation
  • device: all device packages
  • device/i2c: all i2c devices
  • device/serial: all serial devices
  • device/modbus: all modbus devices
  • device/udp: all udp devices
  • device/pinio: all pinio devices
  • examples: all example packages