433-rf-transmit

wayland/433mhz-rf-module/433-rf-transmit

Transmit a string using 433-rf-device. Pin 12 of Arduino should be connected to the data pin of the transmitter.
433-rf-transmit
@/433-rf-transmit
Transmit a string using 433-rf-device. Pin 12 of Arduino should be connected to the data pin of the transmitter.
DEV@/433-rf-device
A 433-rf-device.
MSGstring
Message to be transmitted.
SENDpulse
Send message on pulse.
433-rf-transmit
DEV
MSG
SEND
SENT
SENTpulse
Pulse on each message sent.
To use the node in your project you should have the wayland/433mhz-rf-module 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_SEND>(ctx))
        return;

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

    auto xString = getValue<input_MSG>(ctx);
    int N=length(xString) + 1;
    char cString[N];
    for(int i=0;i<N;i++)
    cString[i]=0;
    dump(xString, cString);
    driver->send(cString, strlen(cString));
    driver->waitPacketSent();

    emitValue<output_SENT>(ctx, 1);
}