Remote Tx Sample

This application demonstrates sending NEC protocol IR messages.

To run the example:

  1. Open the IoT_Node_IRRemote_Tx sketch from the examples menu.

  2. Select Turta IoT Node from the Tools > Board menu.

  3. Select your device's COM port from Tools > Port menu.

  4. Open Serial Monitor from Tools > Serial Monitor.

  5. Select 115.200 baud from the Serial Monitor's status bar.

  6. Upload the code to your device.

Sample Code

IoT_Node_IRRemote_Tx.ino
IoT_Node_IRRemote_Tx.ino
#include <Turta_IRRemote_Module.h>
#define LED 13
// Create IR Remote Module instance.
Turta_IRRemote_Module ir;
void setup() {
// Initialize onboard LED.
pinMode(LED, OUTPUT);
// Initialize IR Remote Module.
ir.begin();
ir.setReception(false);
// Configure serial port.
Serial.begin(115200);
delay(200);
}
void loop() {
digitalWrite(LED, HIGH);
ir.sendNECCommand(1, 2, 3, 252);
digitalWrite(LED, LOW);
// Delay 10000ms = 10 seconds.
delay(10000);
}

Result

After the application is uploaded to the device, it sends IR messages every 10 seconds and blinks the onboard LED while sending the message.

The application runs forever until you clear it from memory.