315Mhz 4Channel Remote Control Kit (PT2262/PT2272) [S054]



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


* Specs

1.Operating voltage: DC12V (27A/12V battery x1)

2.Operating Current: 10mA @ 12V 

3.Radiated power: 10mw @ 12V

4.Modulation mode: ASK (Amplitude Modulation) 

5.Transmitting frequency: 315MHZ 

6.Transmission distance :50-100M (Open field, the receiver sensitivity of -100dbm) 

7.Encoder types: fixed code


* Contents

- Connect

VT ------ D6

D3 ----- D5

D2 ----- D4

D1 ----- D3

D0 ------ D2

5V ----- 5V

GND ----- GND


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


LiquidCrystal_I2C lcd(0x27,20,4);  // LCD2004


int pinD0 = 2;

int pinD1 = 3;

int pinD2 = 4;

int pinD3 = 5;

int pinVT = 6;


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");


  pinMode(pinD0,INPUT);

  pinMode(pinD1,INPUT);

  pinMode(pinD2,INPUT);

  pinMode(pinD3,INPUT);

  pinMode(pinVT,INPUT);


  delay(1000);


  lcd.clear();

}


void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S054:RF 315Mhz T/R");


  int valD0 = digitalRead(pinD0);

  int valD1 = digitalRead(pinD1);

  int valD2 = digitalRead(pinD2);

  int valD3 = digitalRead(pinD3);

  int valVT = digitalRead(pinVT);


  lcd.setCursor(0,1);

  lcd.print("D0=" + (String)valD0 + "(D) D1="+ (String)valD1 + "(C)");

  lcd.setCursor(0,2);

  lcd.print("D2=" + (String)valD2 + "(B) D3="+ (String)valD3 + "(A)");

  lcd.setCursor(0,3);

  lcd.print("VT=" + (String)valVT + "  " );


}

Posted by RDIoT

댓글을 달아 주세요

  1. 이민주  댓글주소 수정/삭제 댓글쓰기 2018.03.17 23:31

    혹시 스위치를 두개 동시에 누르면 그 값이 전달되나요??