Ozeki 10
Arduino Mega Arduino Mega | Ozeki Nano Module Ozeki Nano Module

Arduino Nano IR Transceiver Control Code

OzIRTransceiver is capable to encode and transmit as well as receive and decode different type of remote controller signals. An infrared LED needs to be wired to the microcontroller to transmit signals. To receive signals you should wire an infrared receiver, for example the 1838B. The most widely used application of this device is to read signals from the most popular remote controller brands.

Required hardware

  • Arduino Nano
  • 1838B infrared IR receiver module
  • Infra Red LED
  • Resistor 100Ω

Before you upload this code to your Arduino, please format the EEPROM...

IR receiver source code to install on controller


#include <OzIDManager.h>
#include <OzIRTransceiver.h>

OzIDManager* manager;
OzIRTransceiver* IRTransceiver;

void setup(){
    Serial.begin(115200);

    manager = new OzIDManager;
    manager->_sendACK = true;
    manager->_checksum = true;

    OzCommunication::setIDManager(manager);

    IRTransceiver = new OzIRTransceiver(2, MODE::RECEIVE);

    int x = 1;
    manager->sendLinkSetup();
    manager->PrintWelcomeLine(IRTransceiver, x++, "MyIRReceiver");
}

void loop(){
    OzCommunication::communicate();
    IRTransceiver->ownLoop();
}

IR transmitter source code to install on controller


#include <OzIDManager.h>
#include <OzIRTransceiver.h>

OzIDManager* manager;
OzIRTransceiver* IRTransceiver;

void setup(){
    Serial.begin(115200);

    manager = new OzIDManager;
    manager->_sendACK = true;
    manager->_checksum = true;

    OzCommunication::setIDManager(manager);

	//Mega D9, Nano, Uno D3 pin
    IRTransceiver = new OzIRTransceiver(MODE::SEND);

    int x = 1;
    manager->sendLinkSetup();
    manager->PrintWelcomeLine(IRTransceiver, x++, "MyIRTransmitter");
}

void loop(){
    OzCommunication::communicate();
    IRTransceiver->ownLoop();
}
Copyright © 2000- - Ozeki Ltd | info@ozeki.hu
Home > Products > Ozeki 10 > Connections > Arduino > IR Transceiver > Arduino Nano
Legal | Privacy | Terms of use | 3100
3.235.22.210 | 92.118.27.157 | Login