dht11-device

xod-dev/dht/dht11-device

Represents a DHT11 sensor. Also named RHT01.
dht11-device
@/dht11-device
Represents a DHT11 sensor. Also named RHT01.
PORTport
Board port number the hygrometer is connected to.
dht11-device
PORT
DEV
DEV@/dht11-device
To use the node in your project you should have the xod-dev/dht 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

node {
    meta {
      struct Type {
         static constexpr typeof_PORT port = constant_input_PORT;
      };
    }

    void evaluate(Context ctx) {
        static_assert(isValidDigitalPort(constant_input_PORT), "must be a valid digital port");

        // just to trigger downstream nodes
        emitValue<output_DEV>(ctx, {});
    }
}