Compare commits

...

4 Commits

Author SHA1 Message Date
deadprogram fd21e6ac9b all: update for drivers release 0.26.0
Signed-off-by: deadprogram <ron@hybridgroup.com>
2023-09-21 09:43:46 +02:00
Thomas Richner 485ed702c8 pcf8523: bump minimal go version to 1.18 2023-09-20 19:14:17 +02:00
Thomas Richner cfa50fd3c2 pcf8523: RTC driver 2023-09-20 19:14:17 +02:00
Thomas 5888bb2ded Sensirion Sht4x Support (#597)
sht4x: implemented driver
2023-09-19 08:31:43 +02:00
12 changed files with 407 additions and 44 deletions
+37
View File
@@ -1,3 +1,40 @@
0.26.0
---
- **core**
- i2c iface refactor: Resolve #559
- fix uses of legacy i2c WriteRegister calls
- add correct Tx implementation for mock I2C interfaces
- bump golang.org/x/net version
- **new devices**
- **bma42x**
- add new BMA421/BMA425 driver
- **ndir**
- add Sandbox Electronics NDIR CO2 sensor driver (#580)
- **mpu9150**
- implement driver for Mpu9150 (#596)
- **sht4x**
- implement driver for sht4x (#597)
- **pcf8523**
- implement driver for pcf8523 (#599)
- **enhancements**
- **ssd1306**
- improve bus error handling
- **bugfixes**
- **st7789**
- fix scrolling when rotated by 180°
- **st7789**
- fix incorrect Rotation configuration
- fix SetScrollArea
- **ili9341**
- fix SetScrollArea
- **build**
- use latest tag of tinygo-dev container for running tests
0.25.0
---
+4 -6
View File
@@ -3,7 +3,10 @@
[![PkgGoDev](https://pkg.go.dev/badge/tinygo.org/x/drivers)](https://pkg.go.dev/tinygo.org/x/drivers) [![Build](https://github.com/tinygo-org/drivers/actions/workflows/build.yml/badge.svg?branch=dev)](https://github.com/tinygo-org/drivers/actions/workflows/build.yml)
This package provides a collection of hardware drivers for devices such as sensors and displays that can be used together with [TinyGo](https://tinygo.org).
This package provides a collection of 101 different hardware drivers for devices such as sensors and displays that can be used together with [TinyGo](https://tinygo.org).
For the complete list, please see:
https://tinygo.org/docs/reference/devices/
## Installing
@@ -50,11 +53,6 @@ func main() {
}
```
## Supported devices
There are currently 96 devices supported. For the complete list, please see:
https://tinygo.org/docs/reference/devices/
## Contributing
Your contributions are welcome!
+34
View File
@@ -0,0 +1,34 @@
package main
import (
"machine"
"time"
"tinygo.org/x/drivers/pcf8523"
)
func main() {
machine.I2C0.Configure(machine.I2CConfig{})
dev := pcf8523.New(machine.I2C0)
// make sure the battery takes over if power is lost
err := dev.SetPowerManagement(pcf8523.PowerManagement_SwitchOver_ModeStandard)
if err != nil {
panic(err)
}
// set RTC once, i.e. from `date -u +"%Y-%m-%dT%H:%M:%SZ"`
now, _ := time.Parse(time.RFC3339, "2023-09-18T20:31:38Z")
err = dev.SetTime(now)
if err != nil {
panic(err)
}
for {
ts, err := dev.ReadTime()
if err != nil {
panic(err)
}
println("tick-tock, it's: " + ts.String())
time.Sleep(2 * time.Second)
}
}
+23
View File
@@ -0,0 +1,23 @@
package main
import (
"fmt"
"machine"
"time"
"tinygo.org/x/drivers/sht4x"
)
func main() {
machine.I2C0.Configure(machine.I2CConfig{})
sensor := sht4x.New(machine.I2C0)
for {
temp, humidity, _ := sensor.ReadTemperatureHumidity()
t := fmt.Sprintf("%.2f", float32(temp)/1000)
h := fmt.Sprintf("%.2f", float32(humidity)/100)
println("Temperature: ", t, "°C")
println("Humidity: ", h, "%")
time.Sleep(2 * time.Second)
}
}
+10 -2
View File
@@ -1,6 +1,6 @@
module tinygo.org/x/drivers
go 1.15
go 1.18
require (
github.com/eclipse/paho.mqtt.golang v1.2.0
@@ -9,4 +9,12 @@ require (
golang.org/x/net v0.7.0
tinygo.org/x/tinyfont v0.3.0
tinygo.org/x/tinyterm v0.1.0
)
)
require (
github.com/google/go-cmp v0.5.2 // indirect
github.com/kr/pretty v0.2.1 // indirect
github.com/kr/text v0.1.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect
)
+1 -35
View File
@@ -7,56 +7,22 @@ github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
github.com/hajimehoshi/go-jisx0208 v1.0.0/go.mod h1:yYxEStHL7lt9uL+AbdWgW9gBumwieDoZCiB1f/0X0as=
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/sago35/go-bdf v0.0.0-20200313142241-6c17821c91c4/go.mod h1:rOebXGuMLsXhZAC6mF/TjxONsm45498ZyzVhel++6KM=
github.com/valyala/fastjson v1.6.3/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
tinygo.org/x/drivers v0.14.0/go.mod h1:uT2svMq3EpBZpKkGO+NQHjxjGf1f42ra4OnMMwQL2aI=
tinygo.org/x/drivers v0.15.1/go.mod h1:uT2svMq3EpBZpKkGO+NQHjxjGf1f42ra4OnMMwQL2aI=
tinygo.org/x/drivers v0.16.0/go.mod h1:uT2svMq3EpBZpKkGO+NQHjxjGf1f42ra4OnMMwQL2aI=
tinygo.org/x/drivers v0.19.0/go.mod h1:uJD/l1qWzxzLx+vcxaW0eY464N5RAgFi1zTVzASFdqI=
tinygo.org/x/tinyfont v0.2.1/go.mod h1:eLqnYSrFRjt5STxWaMeOWJTzrKhXqpWw7nU3bPfKOAM=
tinygo.org/x/tinyfont v0.3.0 h1:HIRLQoI3oc+2CMhPcfv+Ig88EcTImE/5npjqOnMD4lM=
tinygo.org/x/tinyfont v0.3.0/go.mod h1:+TV5q0KpwSGRWnN+ITijsIhrWYJkoUCp9MYELjKpAXk=
tinygo.org/x/tinyfs v0.1.0/go.mod h1:ysc8Y92iHfhTXeyEM9+c7zviUQ4fN9UCFgSOFfMWv20=
tinygo.org/x/tinyterm v0.1.0 h1:80i+j+KWoxCFa/Xfp6pWbh79x+8zUdMXC1vaKj2QhkY=
tinygo.org/x/tinyterm v0.1.0/go.mod h1:/DDhNnGwNF2/tNgHywvyZuCGnbH3ov49Z/6e8LPLRR4=
tinygo.org/x/tinyterm v0.1.0/go.mod h1:/DDhNnGwNF2/tNgHywvyZuCGnbH3ov49Z/6e8LPLRR4=
+89
View File
@@ -0,0 +1,89 @@
// Package pcf8523 implements a driver for the PCF8523 CMOS Real-Time Clock (RTC)
//
// Datasheet: https://www.nxp.com/docs/en/data-sheet/PCF8523.pdf
package pcf8523
import (
"time"
"tinygo.org/x/drivers"
)
type Device struct {
bus drivers.I2C
Address uint8
}
func New(i2c drivers.I2C) Device {
return Device{
bus: i2c,
Address: DefaultAddress,
}
}
// Reset resets the device according to the datasheet section 8.3
// This does not wipe the time registers, but resets control registers.
func (d *Device) Reset() (err error) {
return d.bus.Tx(uint16(d.Address), []byte{rControl1, 0x58}, nil)
}
// SetPowerManagement configures how the device makes use of the backup battery, see
// datasheet section 8.5
func (d *Device) SetPowerManagement(b PowerManagement) error {
return d.setRegister(rControl3, byte(b)<<5, 0xE0)
}
func (d *Device) setRegister(reg uint8, value, mask uint8) error {
var buf [1]byte
err := d.bus.Tx(uint16(d.Address), []byte{reg}, buf[:])
if err != nil {
return err
}
buf[0] = (value & mask) | (buf[0] & (^mask))
return d.bus.Tx(uint16(d.Address), []byte{reg, buf[0]}, nil)
}
// SetTime sets the time and date
func (d *Device) SetTime(t time.Time) error {
buf := []byte{
rSeconds,
bin2bcd(t.Second()),
bin2bcd(t.Minute()),
bin2bcd(t.Hour()),
bin2bcd(t.Day()),
bin2bcd(int(t.Weekday())),
bin2bcd(int(t.Month())),
bin2bcd(t.Year() - 2000),
}
return d.bus.Tx(uint16(d.Address), buf, nil)
}
// ReadTime returns the date and time
func (d *Device) ReadTime() (time.Time, error) {
buf := make([]byte, 9)
err := d.bus.Tx(uint16(d.Address), []byte{rSeconds}, buf)
if err != nil {
return time.Time{}, err
}
seconds := bcd2bin(buf[0] & 0x7F)
minute := bcd2bin(buf[1] & 0x7F)
hour := bcd2bin(buf[2] & 0x3F)
day := bcd2bin(buf[3] & 0x3F)
//skipping weekday buf[4]
month := time.Month(bcd2bin(buf[5] & 0x1F))
year := int(bcd2bin(buf[6])) + 2000
t := time.Date(year, month, day, hour, minute, seconds, 0, time.UTC)
return t, nil
}
// bin2bcd converts binary to BCD
func bin2bcd(dec int) uint8 {
return uint8(dec + 6*(dec/10))
}
// bcd2bin converts BCD to binary
func bcd2bin(bcd uint8) int {
return int(bcd - 6*(bcd>>4))
}
+91
View File
@@ -0,0 +1,91 @@
package pcf8523
import (
"encoding/hex"
"testing"
"time"
"tinygo.org/x/drivers/tester"
)
func TestDecToBcd_RoundTrip(t *testing.T) {
for i := 0; i < 60; i++ {
a := bcd2bin(bin2bcd(i))
if a != i {
t.Logf("not equal: %d != %d", a, i)
t.FailNow()
}
}
}
func TestDevice_Reset(t *testing.T) {
bus := tester.NewI2CBus(t)
fake := bus.NewDevice(DefaultAddress)
dev := New(bus)
err := dev.Reset()
assertNoError(t, err)
assertEquals(t, fake.Registers[rControl1], 0x58)
}
func TestDevice_SetPowerManagement(t *testing.T) {
bus := tester.NewI2CBus(t)
fake := bus.NewDevice(DefaultAddress)
dev := New(bus)
err := dev.SetPowerManagement(PowerManagement_SwitchOver_ModeStandard)
assertNoError(t, err)
assertEquals(t, fake.Registers[rControl3], 0b100<<5)
}
func TestDevice_SetTime(t *testing.T) {
bus := tester.NewI2CBus(t)
fake := bus.NewDevice(DefaultAddress)
dev := New(bus)
pointInTime, _ := time.Parse(time.RFC3339, "2023-09-12T22:35:50Z")
err := dev.SetTime(pointInTime)
assertNoError(t, err)
actual := hex.EncodeToString(fake.Registers[rSeconds : rSeconds+7])
expected := "50352212020923"
assertEquals(t, actual, expected)
}
func TestDevice_ReadTime(t *testing.T) {
bus := tester.NewI2CBus(t)
fake := bus.NewDevice(DefaultAddress)
expectedPointInTime := time.Date(2023, 9, 12, 17, 55, 42, 0, time.UTC)
fake.Registers[rSeconds] = 0x42
fake.Registers[rMinutes] = 0x55
fake.Registers[rHours] = 0x17
fake.Registers[rDays] = 0x12
fake.Registers[rMonths] = 0x9
fake.Registers[rYears] = 0x23
dev := New(bus)
//when
actualPointInTime, err := dev.ReadTime()
//then
assertNoError(t, err)
assertEquals(t, actualPointInTime, expectedPointInTime)
}
func assertNoError(t testing.TB, e error) {
if e != nil {
t.Fatalf("unexpected error: %v", e)
}
}
func assertEquals[T comparable](t testing.TB, a, b T) {
if a != b {
t.Fatalf("%v != %v", a, b)
}
}
+39
View File
@@ -0,0 +1,39 @@
package pcf8523
const DefaultAddress = 0x68
// datasheet 8.5 Power management functions, table 11
type PowerManagement byte
const (
PowerManagement_SwitchOver_ModeStandard_LowDetection PowerManagement = 0b000
PowerManagement_SwitchOver_ModeDirect_LowDetection PowerManagement = 0b001
PowerManagement_VddOnly_LowDetection PowerManagement = 0b010
PowerManagement_SwitchOver_ModeStandard PowerManagement = 0b100
PowerManagement_SwitchOver_ModeDirect PowerManagement = 0b101
PowerManagement_VddOnly PowerManagement = 0b101
)
// constants for all internal registers
const (
rControl1 = 0x00 // Control_1
rControl2 = 0x01 // Control_2
rControl3 = 0x02 // Control_3
rSeconds = 0x03 // Seconds
rMinutes = 0x04 // Minutes
rHours = 0x05 // Hours
rDays = 0x06 // Days
rWeekdays = 0x07 // Weekdays
rMonths = 0x08 // Months
rYears = 0x09 // Years
rMinuteAlarm = 0x0A // Minute_alarm
rHourAlarm = 0x0B // Hour_alarm
rDayAlarm = 0x0C // Day_alarm
rWeekdayAlarm = 0x0D // Weekday_alarm
rOffset = 0x0E // Offset
rTimerClkoutControl = 0x0F // Tmr_CLKOUT_ctrl
rTimerAFrequencyControl = 0x10 // Tmr_A_freq_ctrl
rTimerARegister = 0x11 // Tmr_A_reg
rTimerBFrequencyControl = 0x12 // Tmr_B_freq_ctrl
rTimerBRegister = 0x13 // Tmr_B_reg
)
+76
View File
@@ -0,0 +1,76 @@
// Package sht4x provides a driver for the SHT4x digital humidity sensor series by Sensirion.
// Datasheet: https://www.sensirion.com/media/documents/33FD6951/64D3B030/Sensirion_Datasheet_SHT4x.pdf
package sht4x
import (
"time"
"tinygo.org/x/drivers"
)
const DefaultAddress = 0x44
const (
// single-shot, high-repeatability measurement
commandMeasurement = 0xfd
)
// Device represents a SHT4x sensor
type Device struct {
bus drivers.I2C
Address uint8
}
// New creates a new SHT4x connection. The I2C bus must already be
// configured.
func New(bus drivers.I2C) Device {
return Device{
bus: bus,
Address: DefaultAddress,
}
}
// ReadTemperatureHumidity starts a measurement and then reads out the results. This function blocks
// while the measurement is in progress.
//
// Temperature is returned in [degree Celsius], multiplied by 1000,
// and relative humidity in [percent relative humidity], multiplied by 1000.
func (d *Device) ReadTemperatureHumidity() (temperatureMilliCelsius int32, relativeHumidityMilliPercent int32, err error) {
rawTemp, rawHum, err := d.rawReadings()
if err != nil {
return 0, 0, err
}
// from the reference driver: https://github.com/Sensirion/embedded-sht/blob/fcc8a523210cc1241a2750899ff6b0f68f3ed212/sht4x/sht4x.c#L81
temperatureMilliCelsius = ((21875 * int32(rawTemp)) >> 13) - 45000
relativeHumidityMilliPercent = ((15625 * int32(rawHum)) >> 13) - 6000
return temperatureMilliCelsius, relativeHumidityMilliPercent, err
}
// rawReadings returns the sensor's raw values of the temperature and humidity
func (d *Device) rawReadings() (uint16, uint16, error) {
err := d.bus.Tx(uint16(d.Address), []byte{commandMeasurement}, nil)
if err != nil {
return 0, 0, err
}
// max time for measurement according to datasheet
time.Sleep(10 * time.Millisecond)
var data [6]byte
err = d.bus.Tx(uint16(d.Address), nil, data[:])
if err != nil {
return 0, 0, err
}
tTicks := readUint(data[0], data[1])
rhTicks := readUint(data[3], data[4])
return tTicks, rhTicks, nil
}
// readUint converts two bytes to uint16
func readUint(msb byte, lsb byte) uint16 {
return (uint16(msb) << 8) | uint16(lsb)
}
+2
View File
@@ -63,6 +63,7 @@ tinygo build -size short -o ./build/test.hex -target=microbit ./examples/pcd8544
tinygo build -size short -o ./build/test.hex -target=arduino ./examples/servo
tinygo build -size short -o ./build/test.hex -target=pybadge ./examples/shifter/main.go
tinygo build -size short -o ./build/test.hex -target=microbit ./examples/sht3x/main.go
tinygo build -size short -o ./build/test.hex -target=microbit ./examples/sht4x/main.go
tinygo build -size short -o ./build/test.hex -target=microbit ./examples/shtc3/main.go
tinygo build -size short -o ./build/test.hex -target=microbit ./examples/ssd1306/i2c_128x32/main.go
tinygo build -size short -o ./build/test.hex -target=microbit ./examples/ssd1306/spi_128x64/main.go
@@ -102,6 +103,7 @@ tinygo build -size short -o ./build/test.hex -target=circuitplay-express ./examp
tinygo build -size short -o ./build/test.hex -target=arduino-nano33 ./examples/max72xx/main.go
tinygo build -size short -o ./build/test.hex -target=feather-m0 ./examples/dht/main.go
# tinygo build -size short -o ./build/test.hex -target=arduino ./examples/keypad4x4/main.go
tinygo build -size short -o ./build/test.hex -target=feather-rp2040 ./examples/pcf8523/
tinygo build -size short -o ./build/test.hex -target=xiao ./examples/pcf8563/alarm/
tinygo build -size short -o ./build/test.hex -target=xiao ./examples/pcf8563/clkout/
tinygo build -size short -o ./build/test.hex -target=xiao ./examples/pcf8563/time/
+1 -1
View File
@@ -2,4 +2,4 @@ package drivers
// Version returns a user-readable string showing the version of the drivers package for support purposes.
// Update this value before release of new version of software.
const Version = "0.25.0"
const Version = "0.26.0"