If you are asking a question, please follow this template:
- My goal is: [describe your goal] Read sensor with i2c
- My actions are: [describe your actions - code, commands, etc] When I read with the command:
mos call I2C.Read ‘{“addr”: 64, “len”: 2}’
I use this in mos.yml
Enable I2C
- [‘i2c.enable’, ‘b’, true, {title: ‘Enable I2C’}]
- [‘i2c.freq’, ‘i’, 100000, {title: ‘I2C bus speed’}]
- [‘i2c.unit_no’, ‘i’, 0, {title: ‘Which hardware unit ot use, 0 or 1’}]
- [‘i2c.sda_gpio’, ‘i’, 21, {title: ‘GPIO to use for SDA’}]
- [‘i2c.scl_gpio’, ‘i’, 22, {title: ‘GPIO to use for SCL’}]
And when I use:
mos call I2C.Scan
this is the response:
[
64
]
- The result I see is: [show the result - log, etc]
Error: /Users/mos/mos/go/src/github.com/mongoose-os/mos/mos/dev/dev_conn_impl.go:171: remote error 503: I2C read failed
/Users/mos/mos/go/src/github.com/mongoose-os/mos/mos/dev/dev_conn_impl.go:180:
/Users/mos/mos/go/src/github.com/mongoose-os/mos/mos/main.go:196: call failed
- My expectation & question is: [describe your expectation and your question] What´s is the problem? I try very hard but I don’t know what happens.