TinyGo drivers for sensors and other devices that use I2C, SPI, GPIO, ADC, and UART interfaces.

Overview

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.

Comments
  • sdcard: add support for fatfs

    sdcard: add support for fatfs

    Added filesystem support. The commit will be cleaned up later.

    I'm checking with windows 10 + feather-m4-can + 8GB sdcard w/fat32. It is readonly at this time. To make it writable, you need to change the settings on tinygo-org/tinyfs .

    SPI Configured. Reading flash info
    ==> ls
    drwxrwxrwx     0 System Volume Information
    drwxrwxrwx     0 bin
    drwxrwxrwx     0 lib
    drwxrwxrwx     0 pkg
    drwxrwxrwx     0 src
    drwxrwxrwx     0 targets
    ==> ls bin
    -rwxrwxrwx 138400394 tinygo.exe
    ==> cat targets/feather-m4.json
    00000000: 7b 0d 0a 20 20 20 20 22 69 6e 68 65 72 69 74 73    {..    "inherits
    00000010: 22 3a 20 5b 22 61 74 73 61 6d 64 35 31 6a 31 39    ": ["atsamd51j19
    00000020: 61 22 5d 2c 0d 0a 20 20 20 20 22 62 75 69 6c 64    a"],..    "build
    00000030: 2d 74 61 67 73 22 3a 20 5b 22 66 65 61 74 68 65    -tags": ["feathe
    00000040: 72 5f 6d 34 22 5d 2c 0d 0a 20 20 20 20 22 66 6c    r_m4"],..    "fl
    00000050: 61 73 68 2d 31 32 30 30 2d 62 70 73 2d 72 65 73    ash-1200-bps-res
    00000060: 65 74 22 3a 20 22 74 72 75 65 22 2c 0d 0a 20 20    et": "true",..
    00000070: 20 20 22 66 6c 61 73 68 2d 6d 65 74 68 6f 64 22      "flash-method"
    00000080: 3a 20 22 6d 73 64 22 2c 0d 0a 20 20 20 20 22 6d    : "msd",..    "m
    00000090: 73 64 2d 76 6f 6c 75 6d 65 2d 6e 61 6d 65 22 3a    sd-volume-name":
    000000a0: 20 22 46 45 41 54 48 45 52 42 4f 4f 54 22 2c 0d     "FEATHERBOOT",.
    000000b0: 0a 20 20 20 20 22 6d 73 64 2d 66 69 72 6d 77 61    .    "msd-firmwa
    000000c0: 72 65 2d 6e 61 6d 65 22 3a 20 22 66 69 72 6d 77    re-name": "firmw
    000000d0: 61 72 65 2e 75 66 32 22 0d 0a 7d 0d 0a             are.uf2"..}..
    ==>
    
    opened by sago35 48
  • spi: remove machine.SPI and replace with drivers.SPI interface

    spi: remove machine.SPI and replace with drivers.SPI interface

    This PR removes machine.SPI and replaces them with the drivers.SPI interface for almost all SPI drivers.

    There are a couple of drivers that will require additional or special handling. Primarily this has to do with #206

    The flash driver will require changes to any consumers to set the SPI speed before calling into the driver.

    The ili9342 driver has very tight coupling to specific SPI code that probably belongs in the machine package:

    https://github.com/tinygo-org/drivers/blob/release/ili9341/spi_atsamd21.go https://github.com/tinygo-org/drivers/blob/release/ili9341/spi_atsamd51.go

    opened by deadprogram 15
  • Client driver for WiFiNINA firmware

    Client driver for WiFiNINA firmware

    An alternative to the ESP-AT firmware for ESP8266 and ESP32 is nina-fw from Arduino: https://github.com/arduino/nina-fw

    This is the default firmware on ESP chip of the Arduino Nano 33 IOT as well as a number of Adafruit boards and daughterboards, having a driver for it would obviate the need to reflash the ESP chip and simplify the experience of using these boards with TinyGo. Also, this firmware uses 8MHz SPI instead of UART which should be faster could eventually take advantage of DMA.

    Currently WIP; code for framing messages to the ESP chip according the firmware's protocol and a number of commands are working. This initial commit has enough functionality implemented to initialize the SPI communication, scan for and connect to wifi networks, and read connection status and IP information.

    Next steps will be to get connection and data transfer working with an API that matches espat/net with the goal that eventually users can easily choose between either implementation without having to rewrite their code.

    opened by bgould 15
  • Add mcp2515 driver

    Add mcp2515 driver

    I added a driver for a CAN controller that works with a SPI interface called mcp2515. This allows you to communicate with other microcontrollers using the CAN (Controller Aread Network) protocol.

    Tested with the following boards.

    • Adafruit Feather-m4
    • SeeedStudio Seeeduino Xiao
    opened by akif999 13
  • P1AM base controller driver

    P1AM base controller driver

    This PR adds basic support for the P1AM base controller. This is an embedded peripheral that is present on the P1AM-100 board. Since this is a built-in peripheral, there's no configuration available for what SPI port and pins to use, etc. I included an example program so you can see what the API is like. I don't have a full set of expansion modules, so I've only been able to test/implement digital I/O modules.

    opened by quentinmit 13
  • Add a servo library (like Arduino Servo.h)

    Add a servo library (like Arduino Servo.h)

    For Arduino programming using their language, a specific driver library exists for easy and simple control over Servo parts. This seems to be non supported at the moment when using tinygo.

    This functionality would be very useful for especially Arduino users that want to use their servos, but I guess that it might be useful for other boards too, depending on implementation. I will mostly be using it on an Arduino Uno though...

    See the Servo Reference and Servo Library Repository for more information.

    Related to https://github.com/tinygo-org/tinygo/issues/855 about PWM support needed to implement this.

    enhancement 
    opened by Jacalz 12
  • GPS driver

    GPS driver

    Currently this runs and the example prints out fixes every second:

    GPS Example
    675
    $GNGGA,092037.00,5135.20819,N,00006.13578,W,1,06,4.36,0.5,M,45.6,M,,*54
    09:20:37, lat=51.586803, long=-0.102263, altitude:=0, satelites=6
    675
    $GNGGA,092038.00,5135.20784,N,00006.13592,W,1,06,4.36,0.1,M,45.6,M,,*50
    09:20:38, lat=51.586797, long=-0.102265, altitude:=0, satelites=6
    ...
    

    and runs for about a minute or so and then hangs or gets a panic OOM

    opened by torntrousers 12
  • lsm9ds1: minimal implementation

    lsm9ds1: minimal implementation

    Depends on tinygo PR exposing additional pins on nano-33-ble board to compile example.

    @alankrantas Something of interest for you to check? Seem like we are both working on Nano 33 BLE support at the moment.

    IMU communication does not work for me until I2C_PULLUP pin is set high, something I don't see in your examples for other sensors, @alankrantas And that makes me wonder... Any ideas?

    I2C pull-up trick was copied from Arduino Mbed code for this board https://github.com/arduino/ArduinoCore-mbed/blob/master/variants/ARDUINO_NANO33BLE/variant.cpp#L159

    opened by ysoldak 11
  • Lora sx126x and sx127x drivers

    Lora sx126x and sx127x drivers

    Hi all.

    I've been very busy in the past month, but now I'd like to resume (and finish) my work on both sx126x and sx127x Lora drivers.

    As a reminder, sx127x can be found on RFM95 Lora modules, and sx126x can be found in STM32WLE5 Lora SoC

    Although there is still much work to get these drivers working, you can find here my current developpement branches:

    https://github.com/ofauchon/tinygo-drivers/tree/lora-sx127x https://github.com/ofauchon/tinygo-drivers/tree/lora-sx126x

    Please note that my lora-sx127x driver is heavilly based on @torntrousers awesome work (#60)

    If you are interested in helping in the developpement of these drivers, please leave a comment.

    Tell us about your project, the hardware you plan to use (sx126x / sx127x), and how you can help (tests, developpement, providing hardware ? ).

    Thanks

    Olivier

    enhancement 
    opened by ofauchon 11
  • Driver request for DHT-11 and DHT-22

    Driver request for DHT-11 and DHT-22

    I would like to request a driver for the DHT-11 and DHT-22 Temperature/Humidity sensor. I have seen a few libraries on github for go, but they seem to be specific to raspberry pi.

    enhancement 
    opened by homebrew79 11
  • i2csoft: add support for software I2C

    i2csoft: add support for software I2C

    Added I2C software implementation for esp8266, esp32, etc. It can also be used for atsamd51 and others, but be aware that it is not a very accurate process.

    Since the esp32 has hardware I2C, it should really implement hardware I2C instead of SI2C. However, I thought I would lose motivation if I implemented the hardware I2C driver first, so I implemented the software I2C first.

    https://github.com/tinygo-org/tinygo/pull/2125

    opened by sago35 10
  • microbitmatrix: x and y axis inverted?

    microbitmatrix: x and y axis inverted?

    The microbitmatrix driver does not give me the expected results, if using the SetPixel method. The method is defined as SetPixel(x int16, y int16, c color.RGBA), where I expect x to be the horizontal and y the vertical axis and (0, 0) to be in the upper left corner (if rotation is set to 0, which is the default value).

    This expectation comes from using the Makecode, JavaScript and Python implementations on https://makecode.microbit.org/.

    From the help text of the JavaScript led.plot function:

    function led.plot(x: number, y: number): void
    Turn on the specified LED using x, y coordinates (x is horizontal, y is vertical). (0,0) is upper left.
    
    @param x — the horizontal coordinate of the LED starting at 0
    
    @param y — the vertical coordinate of the LED starting at 0
    

    or Python:

    def led.plot(x: int32, y: int32): None
    Turn on the specified LED using x, y coordinates (x is horizontal, y is vertical). (0,0) is upper left.
    

    With the following program I expect the LED in the top right corner to light (x = 4, y = 0, rotation = 0), but instead, the LED in the bottom left corner does light.

    package main
    
    import (
    	"image/color"
    
    	"tinygo.org/x/drivers/microbitmatrix"
    )
    
    var (
    	display microbitmatrix.Device
    	c       = color.RGBA{255, 255, 255, 255}
    )
    
    func main() {
    	display := microbitmatrix.New()
    	display.Configure(microbitmatrix.Config{
    		Rotation: 0,
    	})
    
    	display.SetPixel(4, 0, c)
    	for {
    		display.Display()
    	}
    }
    

    I have tested the above program on https://play.tinygo.org/ as well as on a microbit V1.5 and microbit V2.20 with the same results.

    I quickly copied the code of the microbitmatrix driver to my project and swapped x and y in https://github.com/tinygo-org/drivers/blob/release/microbitmatrix/microbitmatrix.go on lines 31, 33 and 42, which did resolve the problem for me.

    I am happy to file a PR for this.

    bug next-release 
    opened by breml 2
  • WiFi boards: some way to standardize the handing and recovery from errors

    WiFi boards: some way to standardize the handing and recovery from errors

    This issue is intended to start a conversation about some ways to improve and process the different errors that can occur, and also do so in a consistent way for all of the various WiFi adaptors.

    For example:

    • adaptor error with the hardware itself
    • wifi error such as losing connection with the access point
    • network error such as the remote machine dropping connection
    • protocol error such as mqtt errors (in theory handled already by mqtt package?)

    maybe we want to define handler functions, so that applications can do whatever seems correct for that application. for example, wifi error handler could be called on losing connection with access point, and could try to reconnect.

    If no handler is set up for disconnections, it may be a good idea to reconnect. Of course, the handler can be overridden.

    At the very least make it pretty easy to hook up a handler to a typical behavior, even if not the default. If you have an adaptor error, maybe you want to write a handler to try to restart the adaptor by setting some pins to power cycle it. We probably do not need to provide the typical behaviors, just the hooks then we can look at enhancing it based on what we need ourselves, and what other people ask for.

    This is in part based on conversations already started with @sago35

    Chime in humans of TinyGo!

    enhancement 
    opened by deadprogram 3
  • Want to change the wifi example from const to var.

    Want to change the wifi example from const to var.

    The current code is as follows

    // access point info
    const ssid = ""
    const password = ""
    

    SSID settings, etc., require direct modification of the code. Changing directly increases the possibility of accidental git push.

    So I suggest that it be the following The following form can be rewritten by adding another file.

    It can also be rewritten using ldflags. (tinygo flash -target wioterminal -ldflags '-X "main.ssid=YOUR_SSID"')

    // You can override the setting with the init() in another source code.
    // func init() {
    //    ssid = "your-ssid"
    //    password = "your-password"
    // }
    
    var (
    	// access point info
    	ssid string
    	pass string
    )
    

    So, I would like to rewrite examples. What do you think?

    enhancement next-release 
    opened by sago35 3
  • not able to connect to nodemcu wifi adaptor

    not able to connect to nodemcu wifi adaptor

    its not working

    package main
    
    import (
    	"machine"
    	"time"
    
    	"tinygo.org/x/drivers/espat"
    )
    
    // change actAsAP to true to act as an access point instead of connecting to one.
    const actAsAP = false
    
    // access point info
    const ssid = "HEMANT 2.4G"
    const pass = "********"
    
    // these are the default pins for the Arduino Nano33 IoT.
    // change these to connect to a different UART or pins for the ESP8266/ESP32
    var (
    	uart = machine.UART0
    	tx   = machine.UART_TX_PIN
    	rx   = machine.UART_RX_PIN
    
    	console = machine.Serial
    
    	adaptor *espat.Device
    )
    
    func main() {
    	uart.Configure(machine.UARTConfig{TX: tx, RX: rx})
    
    	// Init esp8266
    	adaptor = espat.New(uart)
    	adaptor.Configure()
    
    	// first check if connected
    	if connectToESP() {
    		println("Connected to wifi adaptor.")
    		adaptor.Echo(false)
    
    		connectToAP()
    	} else {
    		println("")
    		failMessage("Unable to connect to wifi adaptor.")
    		return
    	}
    
    	println("Type an AT command then press enter:")
    	prompt()
    
    	input := make([]byte, 64)
    	i := 0
    	for {
    		if console.Buffered() > 0 {
    			data, _ := console.ReadByte()
    
    			switch data {
    			case 13:
    				// return key
    				console.Write([]byte("\r\n"))
    
    				// send command to ESP8266
    				input[i] = byte('\r')
    				input[i+1] = byte('\n')
    				adaptor.Write(input[:i+2])
    
    				// display response
    				r, _ := adaptor.Response(500)
    				console.Write(r)
    
    				// prompt
    				prompt()
    
    				i = 0
    				continue
    			default:
    				// just echo the character
    				console.WriteByte(data)
    				input[i] = data
    				i++
    			}
    		}
    		time.Sleep(10 * time.Millisecond)
    	}
    }
    
    func prompt() {
    	print("ESPAT>")
    }
    
    // connect to ESP8266/ESP32
    func connectToESP() bool {
    	for i := 0; i < 10; i++ {
    		println("Connecting to wifi adaptor...")
    		if adaptor.Connected() {
    			return true
    		}
    		time.Sleep(1 * time.Second)
    	}
    	return false
    }
    
    // connect to access point
    func connectToAP() {
    	println("Connecting to wifi network '" + ssid + "'")
    
    	if err := adaptor.ConnectToAccessPoint(ssid, pass, 10*time.Second); err != nil {
    		failMessage(err.Error())
    	}
    
    	println("Connected.")
    	ip, err := adaptor.GetClientIP()
    	if err != nil {
    		failMessage(err.Error())
    	}
    
    	println(ip)
    }
    
    // provide access point
    func provideAP() {
    	println("Starting wifi network as access point '" + ssid + "'...")
    	adaptor.SetWifiMode(espat.WifiModeAP)
    	adaptor.SetAPConfig(ssid, pass, 7, espat.WifiAPSecurityWPA2_PSK)
    	println("Ready.")
    	ip, _ := adaptor.GetAPIP()
    	println(ip)
    }
    
    func failMessage(msg string) {
    	for {
    		println(msg)
    		time.Sleep(1 * time.Second)
    	}
    }
    
    opened by Siddid-soni 0
  • rtl8720dn: add Rpc_tcpip_adapter_init_with_timeout()

    rtl8720dn: add Rpc_tcpip_adapter_init_with_timeout()

    For example, if the firmware of the RTL8720 is out of date, no response will be returned. This PR defines functions that can time out in such cases.

    The reason for not updating Rpc_tcpip_adapter_init directly is that Rpc_tcpip_adapter_init is automatically generated.

    opened by sago35 0
Releases(v0.22.0)
  • v0.22.0(Aug 16, 2022)

    • new devices

      • epd: add waveshare 2.9in (v1)
      • makeybutton: add driver for MakeyMakey-like button
    • enhancements

      • rtl8720dn
        • add UDP close function
        • improve error handling
      • net/http
        • improve header parsing
        • add last-will-and-testament to MQTT
      • net/mqtt
        • adds keepalive pinging, disconnect, and graceful goroutine cleanup
        • support for cookies when https
        • add support for retained messsages
    • bugfixes

      • irremote: Fix irremote reporting incorrect NEC addresses and command codes (#422)
      • net/http: Fix http.Get() with port specification
    • build

      • Makefile recursively finds unit-tests
      • switching to GHA
    • updates

      • update tinyfont to v0.3.0
      • update tinyfs to v0.2.0
    • examples

      • rtl8720dn: add ./examples/rtl8720dn/version
    Source code(tar.gz)
    Source code(zip)
  • v0.21.0(Jul 5, 2022)

    • new devices

      • lsm6ds3tr: initial implementation
      • UC8151: used in Pimoroni's badger2040 e-paper (#416)
      • scd4x: implement driver for CO2 sensor
    • enhancements

      • easystepper: Add support for '8-step mode'
      • vl53l1x: Add functions for setting the device address
      • sdcard: support thingplus-rp2040
      • wifinina: add mutex to prevent communication race problems
      • ws2812
        • support thingplus-rp2040 board
        • Added 125 MHz rp2040 timing
        • Added unsafe.Pointer for pointer conversion
    • bugfixes

      • ssd1351: Fix mirrored text on OLED display
    Source code(tar.gz)
    Source code(zip)
  • v0.20.0(Apr 29, 2022)

    • new devices

      • irremote: Add basic infra-red driver
      • IS31FL3731: add driver for IS31FL3731 matrix LED driver (#370)
      • l3gd20: add gyro driver
      • SSD1289: Driver for SSD1289 LCD
    • enhancements

      • ili9341
        • add support for atsame5x
        • added Feather board support to InitDisplay()
        • avoid heap allocations
      • lps22hb
        • pin rename, sync with main repo
      • lsmXXX
        • unified, error handling, memory management
      • max7xx
        • Add a SetIntensity() function to max7xx driver and example
      • vl53l1x
        • Add functions for setting 'region of interest'
        • Fix switch-case semantics
      • ws2812
        • add support for m5stamp-c3
        • convert AVR assembly to C inline assembly
        • support high-MHz ARMv6M chips like the RP2040
        • write inline assembly using C instead of Go
    • bugfixes

      • dht
        • fix error check in example
        • fix humidity and temperature extraction for DHT22 (#358)
      • esp8266
        • fix ConnectToAccessPoint timeout args
      • image
        • fix interface
      • pca9685
        • add buffered one shot write
        • fix on=0 bug
      • wifinina
        • correct sendParamStr to handle empty strings, such as when connecting to an unsecured access point
    Source code(tar.gz)
    Source code(zip)
  • v0.19.0(Jan 26, 2022)

    • new devices
      • ft6336: add support for ft6336
      • pca9685: PCA9685 driver
      • shtc3: Sensirion SHTC3 Relative Humidity / Temperature i2c sensor
      • sx126x: Driver for Semtech sx126x radio modules
      • xpt2046: XPT2046 Touch driver (#350)
    • enhancements
      • hd44780i2c
        • clean up for go fmt
        • Needed fixes and update hd44780i2c.go
      • ili9341, ili9342
        • add support for m5stack
        • add support for m5stack-core2
      • wifi
        • modify to use shared net.Adapter interface for all supported wifi devices
      • wifinina: remove busy wait
    • bugfixes
      • hd44780
        • fix 4-bit data length flag
        • Reset data pins to output mode after reading
      • Nano 33 BLE drivers (#351)
    • docs
      • examples/wifi: add unified example for tcpclient that compiles for all supported wifi adaptors
    Source code(tar.gz)
    Source code(zip)
  • v0.18.0(Nov 18, 2021)

    • new devices
      • apds9960: add support for APDS-9960 Digital Proximity sensor
      • axp192: add support for AXP192 single Cell Li-Battery and power system management IC
      • hts221: add support for HTS221 capacitive digital sensor for relative humidity and temperature
      • i2csoft: add support for software I2C
      • image: add support for image/jpeg and image/png
      • lps22hb: add support for LPS22HB MEMS nano pressure sensor
      • lsm6dox: add support for lsm6dox accelerometer
      • lsm9ds1: add support for lsm9ds1 accelerometer
    • enhancements
      • ili9341: change to use drivers.SPI interface
      • ws2812
        • generate assembly instead of handwriting it
        • improve timings to be compatible with the WS2811
        • add support for 168MHz (e.g. Adafruit Feather STM32F405)
        • add support for RISC-V
      • wifinina: control nina pins, for example leds
    • docs
      • rtl8720dn: examples for tcpclient, udpstation, mqtt, and webserver
      • wifinina
        • nina-fw update docs
        • examples/wifinina/http-get
      • ili9341: refactor examples
      • Fix broken link for SHT3x datasheet
    • core
      • all: use build directives for both Go1.17 and earlier versions
    • bugfixes
      • net: fix raddr of tcp conn
      • mcp3008: fix bitshift bug
    Source code(tar.gz)
    Source code(zip)
  • v0.17.1(Jul 1, 2021)

  • v0.17.0(Jul 1, 2021)

    • new devices
      • rtl8720dn: add support for rtl8720dn
      • sdcard: add support for spi sdcard driver, along with fatfs
    • enhancements
      • apa102: use 4-byte buffer to improve speed
      • bmi160: avoid heap allocations
      • ili9341: add standard SPI driver
      • wifinina
        • avoid fmt package
        • Fix RSSI command for WiFiNINA + Print current SSID + Wait for correct time before printing it out + Cleanup
      • ws2812
        • rename the pin to ws2812
        • add tag for nrf52833
        • Disable interrupts before sending ws2812 data
        • add support for qtpy and atsame5x
    • core
      • modules: switch to use tinygo-org version of tinyfs package
      • all: use machine.Serial as the default output
    Source code(tar.gz)
    Source code(zip)
  • v0.16.0(May 12, 2021)

    • new devices
      • aht20: add device
      • ina260: add new i2c device
      • keypad: add 4x4 keypad driver (#226)
      • max7219: add driver support
      • mcp2515: add support for mcp2515 CAN device
      • p1am: support the P1AM-100 hardware watchdog
      • pcf8563: add support for pcf8563 real time clock
      • servo: add driver using PWM
      • tm1637: add support for tm1637 7-segment LED
      • tone: add package for producing tones using the PWM interface
    • enhancements
      • pwm: update drivers with PWM to use new interface
      • wifinina: Make TLS work over WiFiNINA Verified on Arduino Nano33 IoT and nina fw v1.4.5
      • ssd1306: Enable reset screen for SSD1306 via I2C
      • st7789: add scrolling functions to match st7735
    • bugfixes
      • wifinina:
        • fix getMACAddress and getTime
        • fix println + cleanup
        • remove debug flag and remove unnecessary padding call
        • fix padding and implement missing functions
      • flash: fix EraseBlocks method which is erasing sectors instead
    • core
      • all: use interfaces for UART objects
      • all: do not take the pointer of an I2C object
      • adc: update drivers with ADC to use new config struct
    • testing
      • tester:
        • add a mock for command-oriented i2c devices
        • add 16-bit register mock device
    • docs
      • ssd1306: example of ssd1306 with 128x64 display over I2C
      • wifinina:
        • add information about Adafruit boards with ESP32 wifi coprocessors, and modify examples to remove code that was both not being used, and also prevented many Adafruit boards from being able to be targeted by the examples
        • update docs to simplify the nina-fw update process
        • example that connects to AP and prints ip addresses, time and mac
      • p1am: documentation and example program
      • add missing new drivers added since last release
    Source code(tar.gz)
    Source code(zip)
  • v0.15.1(Mar 6, 2021)

  • v0.15.0(Mar 6, 2021)

    • new devices
      • dht: add DHTXX thermometer
      • mcp23017: new driver for MCP23017 (I2C port expander)
      • bmp388: Add bmp388 support (#219)
    • enhancements
      • hd44780: add a mode to work with boards where the RW pin is grounded
      • st7789: add scrolling functions to match st7735
      • microbitmatrix: matrix now working on microbit v2
      • ds1307: Better interface "ReadTime" instead of "Time"
      • ws2812: make AVR support more robust
    • bugfixes
      • all: fix main package in examples
    • core
      • adc: update all drivers with ADC to use new config struct
      • spi: remove machine.SPI and replace with drivers.SPI interface for almost all SPI drivers
    • testing
      • test: run unit tests against i2c drivers and any spi drivers without direct gpio
    • docs
      • st7789: correct errors on various godoc comments
    Source code(tar.gz)
    Source code(zip)
  • v0.14.0(Sep 17, 2020)

    • new devices
      • lis2mdl: add LIS2MDL magnetometer (#187)
      • waveshare: add Waveshare 4.2in B/W e-paper driver (#183)
    • enhancements
      • adt7410: add connection test and for that matter connection method
      • gps
        • add speed and heading to fix, as parsed from RMC NMEA sentence
        • improvements and bugfixes (#186)
      • ili9341
        • add support for setting framerate, vsync pause, and reading scanline data.
        • renamed NewSpi() to NewSPI() in accordance with Go naming conventions
      • ws2812
        • add support for ESP8266
        • add support for ESP32
    • bugfixes
      • ili9341
        • rix setWindow bug, add CS pin for Clue compatibility. (#180)
        • bugfix for RAMWR bug
      • lis2mdl: turn on read mode on every read, to ensure that magnetometer data is updated
    • core
      • i2c
        • switch all i2c drivers definitions to use i2c bus interface type instead of machine package concrete type
        • correct interface definition for I2C Tx function
    • testing
      • fix smoke-test unless avr-gcc installed
      • add very basic mock structs for testing i2c devices, based on work done by @rogpeppe
      • improve API surface and implement one more test function in lis2mdl driver
    • docs
      • replace README badge for godocs with pkgdocs
    Source code(tar.gz)
    Source code(zip)
  • v0.13.0(Aug 4, 2020)

    • new devices
      • bmi160: add initial support
      • bmp280: added support for the Bosch BMP280 temperature and pressure sensor. (#158)
      • lsm303agr: add lsm303agr (#162)
      • ssd1351: add SSD1351 OLED display driver (#146)
    • enhancements
      • hd44780: add Hd44780i2c driver (#173)
      • ili9341
        • add ILI9341 TFT driver (SPI) for ATSAMD2x (#174)
        • cache address window to prevent sending unnecessary commands (#171)
        • ILI9341 TFT driver (SPI) (#153)
        • improve performance of ILI9341 on ATSAMD5X
      • ST77xx: fix DrawFastHLine for ST77xx, SSD1331 and SSD1351 DrawFastHLine uses FillRectangle(x,y,width,height,c), so height must be 1 to draw a horizontal line
      • tmp102: add Connected func to check for device
      • wifinina: added UDP support
      • ws2812: update ws2812_avr_16m.go
    • bugfixes
      • apa102: avoid creating garbage
      • bmp180: fix temperature type conversion
    • core
      • all
        • added custom import path (#161)
        • changeover to eliminate all direct use of master/slave terminology
      • build: try vendor in working directory to match expected module path
      • ci: support Go modules
      • modules: update go version and dependency
    • docs
      • docs: reorder to correct alpha and adjust count of supported drivers
    Source code(tar.gz)
    Source code(zip)
  • v0.12.0(Apr 14, 2020)

    • new devices
      • hcsr04: Added HC-SR04 ultrasonic distance sensor. (#143)
      • spi/qspi: Low-level IO driver for serial flash memory via SPI and QSPI (#124)
      • tmp102: TMP102 low-power digital temperature sensor (#141)
      • amg88xx: AMG88xx thermal camera module
    • bugfixes
      • mqtt: reduce use of goroutines in router to not start a new goroutine for each invocation of each callback
    Source code(tar.gz)
    Source code(zip)
  • v0.11.0(Mar 7, 2020)

    • new devices
      • shiftregister: Support for various shift register chips (#135)
    • enhancements
      • shifter: simplify API surface for PyBadge (#137)
      • shifter: new API for shifter driver
      • mqtt: use buffered channels for incoming messages to handle bursts
      • ili9341: Adding scroll functionality (#121)
    • bugfixes
      • wifinina: fix typo on StartScanNetworks
      • ili9341: various bugfixes for display
    • examples
      • semihosting: add example
    • docs
      • readme: Use degree sign instead of ordinal
      • all: fix celsius symbol in all code comments
    Source code(tar.gz)
    Source code(zip)
  • v0.10.0(Jan 31, 2020)

    • new devices
      • adt7410: Support for ADT7410 temperature sensor (#109)
      • ili9341: ILI9341 TFT driver (#115)
      • l293x: added support for h-bridge motor controller
      • l9110x: add support for L9110x h-bridge motor driver
      • resistive: Adding driver for four-wire resistive touchscreen (#118)
    • enhancements
      • st7735: added scroll functionality to st7735
      • st7735: remove default offsets
      • st7789: remove default offsets
      • ws2812: Added nrf52840 tag to ws2812
      • ws2812: work-arounds to allow Digispark to control WS2812 LEDs
    • docs
      • readme: update README to include list of all 44 drivers
      • wifinina: update docs and add Dockerfile to build firmware
      • wifinina: update docs and info on how to install WiFiNINA driver
    Source code(tar.gz)
    Source code(zip)
  • v0.9.0(Dec 23, 2019)

    • new devices
      • net: shared implementation of net package for serial wifi devices
      • shifter: add support for bit Parallel In Serial Out (PISO) shifter
      • stepper: add support for dual stepper motor
      • wifinina: add implementation for WiFiNINA firmware
    • enhancements
      • st7735: improvements in st7735 driver
      • st7789: improvements in st7789 driver
      • ws2812: add support for 120Mhz Cortex-M4
      • ws2812: added Feather M0 and Trinket M0 to build tags for WS2812
      • ws2812: add support for simulation
    • bugfixes
      • ws2812: fix "invalid symbol redefinition" error
    • examples
      • Add examples for wifinina drivers
    Source code(tar.gz)
    Source code(zip)
  • v0.8.0(Nov 26, 2019)

    • new devices
      • mcp3008: add implementation for MCP3008 ADC with SPI interface
      • semihosting: initial implementation of ARM semihosting
    • enhancements
      • espat: refactor response processing for greater speed and efficiency
      • espat: implement mqtt subscribe functionality via blocking select/channels (experimental)
    • bugfixes
      • st7789: fix index out of bounds error
    • examples
      • Add espat driver example for mqtt subscribe
    Source code(tar.gz)
    Source code(zip)
  • v0.7.0(Oct 17, 2019)

    • new devices
      • veml6070: add Vishay UV light sensor
    • enhancements
      • lis3dh: example uses I2C1 so requires config to specify pins since they are not default
      • ssd1331: make SPI TX faster
      • st7735: make SPI Tx faster
    • docs
      • complete missing GoDocs for main and sub-packages
    • core
      • add Version string for support purposes
    • examples
      • Change all espat driver examples to use Arduino Nano33 IoT by default
    Source code(tar.gz)
    Source code(zip)
  • v0.6.0(Sep 9, 2019)

  • v0.5.0(Aug 26, 2019)

  • v0.4.0(Aug 7, 2019)

    • new devices
      • SSD1331 TFT color display
      • ST7735 TFT color display
      • ST7789 TFT color display
    • docs
      • espat
        • complete list of dependencies for flashing NINA-W102 as used in Arduino Nano33 IoT board.
    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Jul 16, 2019)

    • new devices
      • Buzzer for piezo or small speaker
      • PDM MEMS microphone support using I2S interface
    • enhancements
      • epd2in13: added rotation
      • espat
        • add built-in support for MQTT publish using the Paho library packets, alongside some modifications needed for the AT protocol.
        • add DialTLS and Dial methods, update MQTT example to allow both MQTT and MQTTS connections
        • add example that uses MQTT publish to open server
        • add README with information on how to flash ESP32 or ESP8266 with AT command set firmware.
        • add ResolveUDPAddr and ResolveTCPAddr implementations using AT command for DNS lookup
        • change Response() method to use a passed-in timeout value instead of fixed pauses.
        • implement TCPConn using AT command set
        • improve error handling for key TCP functions
        • refactor net and tls interface compatible code into separate sub-packages
        • update MQTT example for greater stability
        • use only AT commands that work on both ESP8266 and ESP32
        • add documentation on how to use Arduino Nano33 IoT built-in WiFi NINA-W102 chip.
    • bugfixes
      • core: Error strings should not be capitalized (unless beginning with proper nouns or acronyms) or end with punctuation, since they are usually printed following other context.
      • docs: add note to current/future contributors to please start by opening a GH issue to avoid duplication of efforts
      • examples: typo in package name of examples
      • mpu6050: properly scale the outputs of the accel/gyro
    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Jun 4, 2019)

  • v0.1.0(May 29, 2019)

    • first release
      • This is the first official release of the TinyGo drivers repo, matching TinyGo 0.6.0. The following devices are supported:
        • ADXL345
        • APA102
        • BH1750
        • BlinkM
        • BMP180
        • DS1307
        • DS3231
        • Easystepper
        • ESP8266/ESP32
        • GPS
        • HUB75
        • LIS3DH
        • MAG3110
        • microbit LED matrix
        • MMA8653
        • MPU6050
        • PCD8544
        • SHT3x
        • SSD1306
        • Thermistor
        • VL53L1X
        • Waveshare 2.13"
        • Waveshare 2.13" (B & C)
        • WS2812
    Source code(tar.gz)
    Source code(zip)
Owner
TinyGo
Go compiler for small places. Microcontrollers, WebAssembly, and command-line tools. Based on LLVM.
TinyGo
❄️ Elsa is a minimal, fast and secure runtime for JavaScript and TypeScript written in Go

Elsa Elsa is a minimal, fast and secure runtime for JavaScript and TypeScript written in Go, leveraging the power from QuickJS. Features URL based imp

Elsa 2.7k Sep 17, 2022
Interactive Go interpreter and debugger with REPL, Eval, generics and Lisp-like macros

gomacro - interactive Go interpreter and debugger with generics and macros gomacro is an almost complete Go interpreter, implemented in pure Go. It of

Massimiliano Ghilardi 1.9k Sep 29, 2022
The Humboldt Web Framework and Toolkit. Using this as an interpeter and server, build webistes in an MVC pattern using Lua.

Humboldt Web Framework Humboldt is a framework written in Go using Lua files to build web applications. What is this framework for? People who want to

Selene Software 0 Jan 21, 2022
Gentee - script programming language for automation. It uses VM and compiler written in Go (Golang).

Gentee script programming language Gentee is a free open source script programming language. The Gentee programming language is designed to create scr

Alexey Krivonogov 99 Sep 26, 2022
GopherLua: VM and compiler for Lua in Go

GopherLua: VM and compiler for Lua in Go. GopherLua is a Lua5.1 VM and compiler written in Go. GopherLua has a same goal with Lua: Be a scripting lang

Yusuke Inuzuka 5k Sep 24, 2022
Process manager for Procfile-based applications and tmux

Overmind Overmind is a process manager for Procfile-based applications and tmux. With Overmind, you can easily run several processes from your Procfil

Sergey Alexandrovich 1.9k Sep 28, 2022
An experimental port of TinyRb to Google go, both as a means of learning go and exploring alternate approaches to implementing Ruby. Work is currently focused on the GoLightly VM.

tinyrb¶ ↑ A tiny subset of Ruby with a Lua'esc VM. Everything in TinyRb should run in the big Ruby. (except bugs and things that don't comply to the p

Eleanor McHugh 70 Sep 22, 2022
A shell parser, formatter, and interpreter with bash support; includes shfmt

sh A shell parser, formatter, and interpreter. Supports POSIX Shell, Bash, and mksh. Requires Go 1.14 or later. Quick start To parse shell scripts, in

Daniel Martí 5.1k Sep 22, 2022
Create virtual machines and run Linux-based operating systems in Go using Apple Virtualization.framework.

vz - Go binding with Apple Virtualization.framework vz provides the power of the Apple Virtualization.framework in Go.

Kei Kamikawa 251 Sep 21, 2022
Go compiler made from scratch, which can compile itself. It's going to be the smallest and simplest go compiler in the world.

Babygo, a go compiler made from scratch Babygo is a small and simple go compiler. (Smallest and simplest in the world, I believe.) It is made from scr

DQNEO 224 Sep 22, 2022
Small Clojure interpreter, linter and formatter.

Joker is a small Clojure interpreter, linter and formatter written in Go. Installation On macOS, the easiest way to install Joker is via Homebrew: bre

Roman Bataev 1.4k Sep 20, 2022
Go bindings to QuickJS: a fast, small, and embeddable ES2020 JavaScript interpreter.

quickjs Go bindings to QuickJS: a fast, small, and embeddable ES2020 JavaScript interpreter. These bindings are a WIP and do not match full parity wit

Kenta Iwasaki 128 Aug 31, 2022
Floppa programming language inspired by the brainf*ck programming language. Created just for fun and you can convert your brainf*ck code to floppa code.

Floppa Programming Language Created just for fun. But if you want to contribute, why not? Floppa p.l. inspired by the brainf*ck programming language.

null 18 Apr 26, 2022
⛳ A minimal programming language inspired by Ink, JavaScript, and Python.

⛳ Golfcart My blog post: Creating the Golfcart Programming Language Getting Started Scope Rules Usage Building and tests Contributions License Golfcar

Andrew Healey 26 Sep 6, 2022
Simple, safe and compiled programming language.

The X Programming Language Simple, safe and compiled programming language. Table of Contents Overview OS Support Contributing License Overview The X p

The X Programming Language 32 Sep 3, 2022
This is a Virtual Operating System made by using GOLANG and FYNE.

Virtual-Operating-System This is a Virtual Operating System made by using GOLANG and FYNE. Hello! All In this project I have made a virtual Operating

SURBHI SINHA 1 Nov 1, 2021
This vitual os application consist of 3 mini applications embedded in it like weather app , text editor and calculator .

Virtual-Operating-System This vitual os application consist of 3 mini applications embedded in it like weather app , text editor and calculator . APPS

shiva sharma 0 Nov 11, 2021
A standalone nREPL/prepl client written in Go and heavily inspired by Grenchman

Trenchman A standalone nREPL/prepl client written in Go, heavily inspired by Grenchman Trenchman is a standalone nREPL/prepl client, which means that

Shogo Ohta 57 Aug 25, 2022
Weave Ignite is an open source Virtual Machine (VM) manager with a container UX and built-in GitOps management.

Weave Ignite is an open source Virtual Machine (VM) manager with a container UX and built-in GitOps management.

Temur Yunusov 0 Nov 16, 2021