Hi,
I'm rather new to MicroPython and the raspberry Pico, and I have been tasked with using I2C to read in data from the Honeywell
HSCDANN015PA2A3 pressure sensor.
I've successfully scanned for the device and received the correct device address (0x28) using Thonny. I've attempted to use a couple of different functions consisting of commands including: readfrom_mem() and bytearray, but have had no luck.
Any help/example code is greatly appreciated,
Brandon
Pico using I2C with pressure sensor
Re: Pico using I2C with pressure sensor
Here's an example i2c driver for an accelerometer. The general pattern is usually pretty similar where you use readfrom_mem and writeto_mem.
https://github.com/micropython/micropyt ... lsm9ds1.py
You will need to study the datasheet carefully to figure out all the registers you need to read/write. It helps to have an existing driver (e.g. written in C) to refer to.
Re: Pico using I2C with pressure sensor
I found this is not specific to micropython but at least you can see how to pass parameters
Code: Select all
https://github.com/ExperimentalAvionics/EFIS_ModuleA