mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-19 06:03:57 +00:00
lis3dh: example uses I2C1 so requires config to specify pins since they are not default
Signed-off-by: Ron Evans <ron@hybridgroup.com>
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
|||||||
var i2c = machine.I2C1
|
var i2c = machine.I2C1
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
i2c.Configure(machine.I2CConfig{})
|
i2c.Configure(machine.I2CConfig{SCL: machine.SCL1_PIN, SDA: machine.SDA1_PIN})
|
||||||
|
|
||||||
accel := lis3dh.New(i2c)
|
accel := lis3dh.New(i2c)
|
||||||
accel.Address = lis3dh.Address1 // address on the Circuit Playground Express
|
accel.Address = lis3dh.Address1 // address on the Circuit Playground Express
|
||||||
|
|||||||
Reference in New Issue
Block a user