Driver for TMP06 temperature sensor. Data is sent by PWM. Tested on Hani-IoT board with TMP06BRTZ sensor.

Example usage

main.cpp

#include "mbed.h"
#include "TMP06.h"

int main()
{
    TMP06 temp_sensor(P0_1);
    float temperature;

    while (true) {
        if(temp_sensor.read(&temperature) == SUCCESS) {
            printf("Temperature: %f\n", temperature);
        }
        else {
            printf("Error!\n");
        }

        ThisThread::sleep_for(2000);
    }
}

Changes

RevisionDateWhoCommit message
2:1ff2f041925a 2020-03-03 Pawel Zarembski blocker for rise and fall functions default tip
1:82fcfd05add8 2020-02-25 Pawel Zarembski update license
0:cee46eec60a8 2020-02-25 Pawel Zarembski populate repo