Skip to content
Snippets Groups Projects
Unverified Commit c257eb1d authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

scd4x: properly transmit read command

parent 9bac2f01
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,7 @@ void SCD4x::read()
txbuf[0] = 0xec;
txbuf[1] = 0x05;
if (i2c.xmit(address, 1, txbuf, 9, rxbuf) == 0) {
if (i2c.xmit(address, 2, txbuf, 9, rxbuf) == 0) {
co2 = (rxbuf[0] << 8) + rxbuf[1];
rawTemperature = ((rxbuf[3] << 8) + rxbuf[4]);
rawHumidity = (rxbuf[6] << 8) + rxbuf[7];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment