Snippet Tag: measure hp203b

measure value of hp203b

void HP203B::Measure_Pressure() { // Set Up the Configuration for the Pressure Sensor uint8_t command = HP203B_CMD_CONVERT | // Convert the Sensor Output to the Digital Values HP203B_CMD_CHNL_PRESTEMP; // Sensor Pressure and Temperature Channel command |= hp_osr; // OSR // Write the configuration to the Pressure Sensor writeRegister(hp_i2cAddress, command); // Wait for the configuration to complete delay(hp_conversionDelay); // Reads the pressure value uint32_t pressure = readRegister(hp_i2cAddress, HP203B_CMD_READ_P); hp_sensorData.P = pressure /100.0; } /**************************************************************************/ /* Reads 20-bits from the destination register Reads the results for Digital Altitude Value */ /**************************************************************************/ void HP203B::Measure_Altitude() { // Set Up the Configuration for the Altitude Sensor

Read More »