4 Head Infrared Transmitter Module [S180]




https://www.youtube.com/watch?v=ZpDeUjWLtsM


*GitHubhttps://github.com/rdiot/rdiot-s180.git


* Specs

Dimensions : 35 * 35mm

Weight : 4g

Voltage : 5V

Ports : Digital Level

Modulation : Direct emission unmodulated

Emission head : 4

Transmitting distance : 1-3m

Wavelength : 940nm


Four launch, multi-directional signal synchronization

A wide range of signal radiation 

With the transmitted signal indicating LED, easy to observe debugging 

Small infrared signal transmitter can be used as the source


* Contents

- Connect

GND ----- GND

VCC ----- 5V

DAT ----- D3


- Key Code

#include <IRremote.h>

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


LiquidCrystal_I2C lcd(0x27,20,4);  // set the LCD address to 0x20 for a 16 chars and 2 line display


//* An IR LED must be connected to Arduino PWM pin 3.

IRsend irsend;

 

void setup()

{

  lcd.init();    // initialize the lcd 

  // Print a message to the LCD.

  lcd.backlight();

}


int count = 0;

void loop() {

 

  int khz = 38; // 38kHz carrier frequency for the NEC protocol

  unsigned int  rawData[67] = {4500,4400, 600,1650, 550,1650, 650,1600, 600,550, 550,550, 550,550, 550,550, 550,550, 550,1650, 600,1650, 550,1650, 600,550, 550,550, 550,550, 550,550, 550,550, 600,500, 600,1600, 600,550, 550,550, 550,550, 550,550, 550,550, 550,550, 600,1600, 600,550, 550,1650, 600,1650, 550,1650, 600,1650, 600,1650, 550,1650, 600};  // SAMSUNG E0E040BF

unsigned int  data = 0xE0E040BF;

 

  irsend.sendRaw(rawData, sizeof(rawData) / sizeof(rawData[0]), khz); //Note the approach used to 


automatically calculate the size of the array.

  

  lcd.setCursor(0,0);

  lcd.print("S180:4 Head IR Trans.");

  lcd.setCursor(0,1);

  count++;

  lcd.print("every 5sec count: "+(String)count+" ");

  lcd.setCursor(0,2);

  lcd.print("data=0xE0E040BF");

 

  delay(5000); //In this example, the signal will be repeated every 5 seconds, approximately.

}

Posted by RDIoT
|