All Projects → tinygo-org → Drivers

tinygo-org / Drivers

Licence: bsd-3-clause
TinyGo drivers for sensors and other devices that use I2C, SPI, GPIO, ADC, and UART interfaces.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Drivers

awesome-embedded-swift
⚡️🛠🧰 A curated list for Embedded and Low-Level development in the Swift programming language.
Stars: ✭ 57 (-77.2%)
Mutual labels:  gpio, i2c, spi, sensors
IOsonata
IOsonata multi-platform multi-architecture power & performance optimized software library for fast and easy IoT MCU firmware development. Object Oriented design, no board package to define, just pure plug & play any boards
Stars: ✭ 40 (-84%)
Mutual labels:  embedded, i2c, spi, sensors
Ofxgpio
Library C++ for raspberrypi and orangepi, GPIO interfaces compatible with openframeworks.
Stars: ✭ 155 (-38%)
Mutual labels:  spi, i2c, gpio
Rppal
A Rust library that provides access to the Raspberry Pi's GPIO, I2C, PWM, SPI and UART peripherals.
Stars: ✭ 463 (+85.2%)
Mutual labels:  spi, i2c, gpio
Diozero
Java Device I/O library that is portable across Single Board Computers. Tested with Raspberry Pi, Odroid C2, BeagleBone Black, Next Thing CHIP, Asus Tinker Board and Arduinos. Supports GPIO, I2C, SPI as well as Serial communication. Also known to work with Udoo Quad.
Stars: ✭ 167 (-33.2%)
Mutual labels:  spi, i2c, gpio
Ssd1306
Driver for SSD1306, SSD1331, SSD1351, IL9163, ILI9341, ST7735, PCD8544, Nokia 5110 displays running on Arduino/ESP32/Linux (Rasperry) platforms
Stars: ✭ 303 (+21.2%)
Mutual labels:  spi, i2c, esp8266
Elixir ale
Interact with hardware in Elixir - GPIOs, I2C and SPI
Stars: ✭ 336 (+34.4%)
Mutual labels:  spi, i2c, gpio
Nf Interpreter
⚙️ nanoFramework Interpreter, CLR, HAL, PAL and reference target boards
Stars: ✭ 168 (-32.8%)
Mutual labels:  spi, i2c, gpio
Swiftygpio
A Swift library for hardware projects on Linux/ARM boards with support for GPIOs/SPI/I2C/PWM/UART/1Wire.
Stars: ✭ 1,188 (+375.2%)
Mutual labels:  spi, i2c, gpio
Mraa
Linux Library for low speed IO Communication in C with bindings for C++, Python, Node.js & Java. Supports generic io platforms, as well as Intel Edison, Intel Joule, Raspberry Pi and many more.
Stars: ✭ 1,220 (+388%)
Mutual labels:  spi, i2c, gpio
Gopi
Raspberry Pi Go Language Interface
Stars: ✭ 82 (-67.2%)
Mutual labels:  spi, i2c, gpio
Waterius
Передача показаний воды по Wi-Fi. Watermeter Wi-Fi transmitter.
Stars: ✭ 295 (+18%)
Mutual labels:  i2c, esp8266, embedded
Powershell Iot
Interact with I2C, SPI & GPIO devices using PowerShell Core!
Stars: ✭ 106 (-57.6%)
Mutual labels:  spi, i2c, gpio
Periph
Go·Hardware·Lean
Stars: ✭ 1,700 (+580%)
Mutual labels:  spi, i2c, gpio
tinyfont
Text library for TinyGo displays
Stars: ✭ 37 (-85.2%)
Mutual labels:  gpio, i2c, spi
Raspberrysharp
A .NET/Mono IO Library for Raspberry Pi This library is a complete refactoring of Raspberry-Sharp libraries, merged into one library and updated to RB3, CM3 and RB3+
Stars: ✭ 41 (-83.6%)
Mutual labels:  spi, i2c, gpio
Tinygo
Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
Stars: ✭ 9,068 (+3527.2%)
Mutual labels:  spi, i2c, gpio
Esp8266 Oled Ssd1306
Driver for the SSD1306 and SH1106 based 128x64, 128x32, 64x48 pixel OLED display running on ESP8266/ESP32
Stars: ✭ 1,590 (+536%)
Mutual labels:  spi, i2c, esp8266
Johnny Five
JavaScript Robotics and IoT programming framework, developed at Bocoup.
Stars: ✭ 12,498 (+4899.2%)
Mutual labels:  spi, i2c, gpio
Rust I2cdev
Rust library for interfacing with i2c devices under Linux
Stars: ✭ 119 (-52.4%)
Mutual labels:  i2c, embedded

TinyGo Drivers

PkgGoDev CircleCI

This package provides a collection of hardware drivers for devices such as sensors and displays that can be used together with TinyGo.

Installing

go get tinygo.org/x/drivers

How to use

Here is an example in TinyGo that uses the BMP180 digital barometer:

package main

import (
    "time"

    "machine"

    "tinygo.org/x/drivers/bmp180"
)

func main() {
    machine.I2C0.Configure(machine.I2CConfig{})
    sensor := bmp180.New(machine.I2C0)
    sensor.Configure()

    connected := sensor.Connected()
    if !connected {
        println("BMP180 not detected")
        return
    }
    println("BMP180 detected")

    for {
        temp, _ := sensor.ReadTemperature()
        println("Temperature:", float32(temp)/1000, "°C")

        pressure, _ := sensor.ReadPressure()
        println("Pressure", float32(pressure)/100000, "hPa")

        time.Sleep(2 * time.Second)
    }
}

Currently supported devices

The following 56 devices are supported.

Device Name Interface Type
ADT7410 I2C Temperature Sensor I2C
ADXL345 accelerometer I2C
AMG88xx 8x8 Thermal camera sensor I2C
APA102 RGB LED SPI
AT24CX 2-wire serial EEPROM I2C
BBC micro:bit LED matrix GPIO
BH1750 ambient light sensor I2C
BlinkM RGB LED I2C
BME280 humidity/pressure sensor I2C
BMI160 accelerometer/gyroscope SPI
BMP180 barometer I2C
BMP280 temperature/barometer I2C
BMP388 pressure sensor I2C
Buzzer GPIO
DHTXX thermometer and humidity sensor GPIO
DS1307 real time clock I2C
DS3231 real time clock I2C
ESP32 as WiFi Coprocessor with Arduino nina-fw SPI
ESP8266/ESP32 AT Command set for WiFi/TCP/UDP UART
GPS module I2C/UART
HC-SR04 Ultrasonic distance sensor GPIO
HD44780 LCD controller GPIO/I2C
HUB75 RGB led matrix SPI
ILI9341 TFT color display SPI
L293x motor driver GPIO/PWM
L9110x motor driver GPIO/PWM
LIS2MDL magnetometer I2C
LIS3DH accelerometer I2C
LSM6DS3 accelerometer I2C
MAG3110 magnetometer I2C
MCP23017 port expander I2C
MCP3008 analog to digital converter (ADC) SPI
Microphone - PDM I2S/PDM
MMA8653 accelerometer I2C
MPU6050 accelerometer/gyroscope I2C
PCD8544 display SPI
Resistive Touchscreen (4-wire) GPIO
Semihosting Debug
Shift register (PISO) GPIO
Shift registers (SIPO) GPIO
SHT3x Digital Humidity Sensor I2C
SPI NOR Flash Memory SPI/QSPI
SSD1306 OLED display I2C / SPI
SSD1331 TFT color display SPI
SSD1351 OLED display SPI
ST7735 TFT color display SPI
ST7789 TFT color display SPI
Stepper motor "Easystepper" controller GPIO
Thermistor ADC
TMP102 I2C Temperature Sensor I2C
VEML6070 UV light sensor I2C
VL53L1X time-of-flight distance sensor I2C
Waveshare 2.13" (B & C) e-paper display SPI
Waveshare 2.13" e-paper display SPI
Waveshare 4.2" e-paper B/W display SPI
WS2812 RGB LED GPIO

Contributing

Your contributions are welcome!

Please take a look at our CONTRIBUTING.md document for details.

License

This project is licensed under the BSD 3-clause license, just like the Go project itself.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].