Skip to content
Hardware sensor interfaces through GPIO, I2C & SPI including BME280, TSL2561, ENER314, RFM69
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This repository contains sensor interfaces for hardware sensors which are interfaced through GPIO, SPI and/or I2C. There are also protocols for communicating between sensors and RPC microservices for accessing sensor data remotely.

In order to use these interfaces, the GOPI application framework ( is used, and the associated set of modules for interfacing hardware and remote procedure calls.

The interfaces and definitions for the sensors are in the package root: sensors.go, rfm69.go, ads1x15.go, bme680.go, energenie.go and protocol.go. You can check the examples in the cmd directory for more information on using the drivers.

For more information on using the drivers, the documentation is in the doc folder:

  • For Bosch BME280 and BME680 temperature, humidity, pressure and air quality sensors please see doc/;
  • For the TAOS TSL2561 luminosity sensor, please see doc/;
  • For the HopeRF RFM69 radio transceiver series, please see doc/;
  • For the Texas Instruments ADS1015 and ADS1115 analog-to-digital converters, please see doc/;
  • For the ENER314 OOK transmitter and OOK/FSK transciever boards, please see doc/;
  • For the implementation of the wire protocol for Energenie MiHome series, please see doc/

Building the examples

There is a makefile which will test and make all the example commands for both MacOS and Raspberry Pi target. On MacOS, only the client command-line utility which allows you to connect to a remote mihome-service is built. On the Raspberry Pi, all the examples are built.

On MacOS:

% make -f Makefile.darwin

On Raspberry Pi:

% make -f Makefile.rpi


Copyright 2016-2019 David Thorpe All Rights Reserved

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

You can’t perform that action at this time.