read-temp

wayland/bno055-aos/read-temp

Returns the current ambient temperature in degrees celsius.
read-temp
@/read-temp
Returns the current ambient temperature in degrees celsius.
DEV@/bno055-device
A bno055 device.
UPDpulse
Update. Triggers new read.
read-temp
DEV
UPD
TEMP
DONE
DONEpulse
Pulses on completion of read.
TEMPnumber
Current ambient temperature in degrees celsius.
To use the node in your project you should have the wayland/bno055-aos library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

struct State {
};

{{ GENERATED_CODE }}

void evaluate(Context ctx) {
    // The node responds only if there is an input pulse
    if (!isInputDirty<input_UPD>(ctx))
        return;

    // Get a pointer to the `Adafruit_BNO055` class instance
    auto aos = getValue<input_DEV>(ctx);

    int8_t temp = aos->getTemp();
    emitValue<output_TEMP>(ctx,temp);
    emitValue<output_DONE>(ctx,1);
}