read-rev-info

wayland/bno055-aos/read-rev-info

Read chip revision numbers of the bno055 absolute orientation sensor.
read-rev-info
@/read-rev-info
Read chip revision numbers of the bno055 absolute orientation sensor.
DEV@/bno055-device
A bno055 device.
UPDpulse
Update. Triggers new read.
read-rev-info
ACC
MAG
GYRO
SW
DONE
DEV
UPD
DONEpulse
Pulses on completion of read.
SWnumber
Software revision number.
GYROnumber
Gyroscope chip revision number.
MAGnumber
Magnetometer chip revision number.
ACCnumber
Accelerometer chip revision number.
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);

    Adafruit_BNO055::adafruit_bno055_rev_info_t revInfo;
    aos->getRevInfo(&revInfo);
    emitValue<output_ACC>(ctx,revInfo.accel_rev);
    emitValue<output_MAG>(ctx,revInfo.mag_rev);
    emitValue<output_GYRO>(ctx,revInfo.gyro_rev);
    emitValue<output_SW>(ctx,revInfo.sw_rev);
    emitValue<output_DONE>(ctx, 1);
}