[vc_row][vc_column][vc_column_text]
IR led is an infrared transmitting tube module and IR sensor is an infrared receiving module ,neither of them need any other peripheral circuit,which can be connected with dupont lines to the arduino,then burned-into the procedure .
[/vc_column_text][vc_tour][vc_tab title=”Part list” tab_id=”1393399234-1-78″][vc_column_text]1.IR LEDandIR sensor in Linksprite Sensor pack
2.arduino x 2
3.Male transfer to female dupont line x 6[/vc_column_text][/vc_tab][vc_tab title=”Hardware installation” tab_id=”1393399234-2-22″][vc_column_text]
IR LED +5v – > arduino +5V OUT
IR LED GND – >arduino GND
IR LED DIN – >arduin D3 Foot
IR sensor 5v – >arduino +5V OUT
IR sensor GND – >arduino GND
IR sensor OUT – > arduino D11 Foot[/vc_column_text][/vc_tab][vc_tab title=”Code section” tab_id=”1393458066540-2-9″][vc_column_text]1.Download infrared libraryIRremote
2.Unzip the download file and put it into arduino libraryfile (…/arduino-0021/libraries)
3.Receiver code
Burned IRrecvDemo into the arduino board which connected the IR sensor
4. The sender code
#include <core.h>; IRsend irsend; void setup (){ pinMode (3, OUTPUT); } void loop (){ Serial.println ("Begin test IR module!"); irsend.sendNEC(0x9f8e7d6c, 32); delay (3000); }
[/vc_column_text][/vc_tab][vc_tab title=”The experimental results” tab_id=”1393458068182-3-7″][vc_column_text]
Open the serial port tools to see the message printed by receiver,successfully received the data 9F8E7D6C.
When you block the transmitting terminal, it will be failure to receive the data.
[/vc_column_text][/vc_tab][vc_tab title=”Mind attention” tab_id=”1393458069345-4-9″][vc_column_text]1.Do not confuse the receiver and transmitter when choosing the serial burn-in procedure due to the two connected arduino.
2.Use your mobile phone camera to point at the infrared transmitting tube to see whether there is red light flashing before you use it.(for naked eye cannot distinguish whether there are infrared emitting)
3. Use the arduino ide version of 0021. Download[/vc_column_text][/vc_tab][/vc_tour][/vc_column][/vc_row]
Leave a Reply
You must be logged in to post a comment.