C030-R412m: Temperature sensor example code

Hi!

The C030-R412m target is a very nice one, but it lacks on documentation. I cannot find any example code how to read the data of the temperature sensor ( Si7034-A10 Temperature sensor). Does someone have a link or code example? Thx!

Library: humidity-temperature-sensor-si7034-a10 - Creation | Mbed

Example code

#include "humidity-temperature-sensor-si7034-a10/si7034.h"
#include "ThisThread.h"
#include "mbed.h"

Si7034 si1(I2C_SDA_B, I2C_SCL_B); // On board I2C.
DigitalOut si1en(PD_14); // Enable pin of Si7034.

int main() {
    // Enable Si7034 device and reset.
    si1en.write(1);
    si1.reset();

    printf("Hello world!\n\r");

    float tempC;
	float tempH;

    while (true) {
        ThisThread::sleep_for(1000);
        si1.getTemperature(&tempC);
        si1.getHumidity(&tempH);
        printf("C°: %f, RH: %f\r\n", tempC, tempH);
    }
}

Attention: the Si7034 library has a bug (@UsmanKhan) Replace:

#include "Si7034.h"

with

#include "si7034.h"

in file humidity-temperature-sensor-si7034-a10/si7034.cpp.