“Infrared receiver”的版本间的差异

来自Microduino Wikipedia
跳转至: 导航搜索
(Created page with "{| style="width: 800px;" |- | ==Outline== Microduino-IR receiver is used to receive infrared signal from Infrared Transmission. It can receive infrared signal within 10m. ...")
 
(没有差异)

2015年10月29日 (四) 07:13的最新版本

Outline

Microduino-IR receiver is used to receive infrared signal from Infrared Transmission. It can receive infrared signal within 10m.

Specification

  • Electrical specification
    • Operation voltage: 3.3V~5V
  • Tech parameters
    • Sensing distance:10m
  • Size
    • Size of the LED: 5mm,
    • Size of the board: 10mm*20mm
    • 1.27mm-pitch 4PIN interface
  • Connection Method
    • GND, VCC, signal port and NC. The signal port can be defined by users.

Development

Equipment

Module Number Function
mCookie-CoreUSB 1 Core board
mCookie-Hub 1 Sensor pin board
Microduino-IR Receiver 1 Infrared receiving

Preparation

Setup 1:Connect the IR receiver's interface with the Hub's D10 digital port.

  • Setup 2:Connect the core, Hub and IR receiver to a computer with a USB cable.

Debugging

  • Open " IRsendDemo " program in the libraries.
Upload.JPG
  • include <IRremote.h> Use infrared library function
  • int RECV_PIN = 10; Define the infrared receiving pin as 10, which can also be changed by users. (For example: Change " RECV_PIN = 11" in the program examples to " RECV_PIN = 10". )
  • IRrecv irrecv(RECV_PIN); Define infrared receiving object
  • irrecv.enableIRIn(); Start infrared receiving
  • Receive infrared signal and output
 if (irrecv.decode(&results)) {      
   Serial.println(results.value, HEX);
   irrecv.resume();
 }
  • You can open the serial monitor and use the infrared remote controller to send signals to the infrared receiving head. When you see the LED light on the IR-receiver blinks once, it means the receiving head has gotten the signals while the serial console will print decoded data.

Application

It can be used in infrared remote control, which is able to be matched with all kinds of infrared remote controller. You need to make sure the infrared signal type and protocol format before using.