You are reading a single comment by @QueensCrown and its replies. Click here to read the full conversation.
  • Thank you for all responses,

    They read the sensor ready data like this

            rslt = bme280_set_regs(&reg_addr, &soft_rst_cmd, 1, dev);
    
           (rslt == BME280_OK)
           //BME280_OK = INT8_C(0)
    

    I did:

    var ERR_REG = 0x02;//According to docs at page 49
     var adr = 0x69;
     var len = 5;// 
    I2C1.writeTo(adr,ERR_REG);
      var response = toHexString(I2C1.readFrom(adr,16)).sliceĀ­(0,len);
       //Response = 00000
    

    If the data is correct 5 zero bit is tells sensor is working correct

    But when I tried to get chip id with same code with len = 7 I get 1414240 (Without converting to hex [ 20, 20, 36, 4, 10, 24, 72 ]). In the driver I must get UINT8_C(0x60) or 0x60 the thing is is 0x60 equal to 1414240 ? or am I converting wrong?


About

Avatar for QueensCrown @QueensCrown started