edit

# Getting Started with Infrared Emitter¶

This repo demonstrates how to use the built-in Infrared Emitter as component in Wio Terminal. The Infrared Emitter is a Digital Interface and can be used to send IR signal, just like what a remote control does!

## Installing the Infrared Library For Wio Terminal¶

2. Now, the Infrared library can be installed to the Arduino IDE. Open the Arduino IDE, and click sketch -> Include Library -> Add .ZIP Library, and choose the Seeed_Arduino_IR file that you've have just downloaded.

## Example Code¶

Navigate to Files -> Examples -> IRLib2 -> Send. The send example will appear and should look like below. To test the IR signal from Wio Terminal, you can use a Grove - Infrared Receiver. This can be easily modified to use Wio Terminal as your TV remote control!

Note: WIO_IR is defined for the builtin Infrared Emitter(Already defined in the header file of this library so no need to defined in ino file)

/* send.ino Example sketch for IRLib2
*  Illustrates how to send a code.
*/
#include <IRLibSendBase.h>    // First include the send base
//Now include only the protocols you wish to actually use.
//The lowest numbered protocol should be first but remainder
//can be any order.
#include <IRLib_P01_NEC.h>
#include <IRLib_P02_Sony.h>
#include <IRLibCombo.h>     // After all protocols, include this
// All of the above automatically creates a universal sending
// class called "IRsend" containing only the protocols you want.
// Now declare an instance of that sender.

IRsend mySender;

void setup() {
Serial.begin(9600);
delay(2000); while (!Serial); //delay for Leonardo
Serial.println(F("Every time you press a key is a serial monitor we will send."));
}

void loop() {