milkv-duo / duo-buildroot-sdk

Milk-V Duo Official buildroot SDK
411 stars 174 forks source link

How can I read 7bytes in a row with wiringx #32

Closed taspenwall closed 10 months ago

taspenwall commented 1 year ago

Sorry if this isn't the right place to ask but I'm very new to programming and looking for a little help. My Duo is connected to an aht21 temp and humidity sensor. Once the sensor is initialized and takes a measurement it wants to returns 7 bytes in a row. On my rpi pico I was able to get the sensor reading when I read the 7bytes in one shot. I've tried looping the wiringXI2CRead() function but I can only ready the 1st byte over and over again. I there a way to read that many bytes using wiringX. It seems that I can only read 1 or two bytes at a time. Thanks

taspenwall commented 10 months ago

Can't be done with wiringx