loading

This instructable will step you through how to get an infrared receiver working with the LinkIt ONE and print out the receivers input.

Let's Begin!

Step 1: Materials

  1. LinkIt ONE micro controller
  2. Breadboard
  3. Breadboard wires
  4. Infrared receiver
  5. Infrared Controller of some kind (Like a TV remote)
  6. IR_Recv_LinkIt_ONE library for arduino IDE

Step 2: IR Recv Library Installation

  1. Download the .zip file from here:
  2. Extract the folder to your desktop
  3. Move the extracted folder to your main arduino libraries folder

Installation of the library is the same as you would with any other arduino library

Step 3: Wiring

If you have the module I have:

  1. "-" pin on module to GND on LinkIt ONE
  2. Middle in on module to 5V on LinkIt ONE
  3. "S" pin on module to D2 on LinkIt ONE (MUST BE D2!!!!)

If you have the individual receiver : (Going from left to right when looking at receiver)

  1. Left pin on module to D2 pin on LinkIt ONE (Must be D2)
  2. Middle pin on module to 5V on LinkIt ONE
  3. Right pin on module to GND on LinkIt ONE


For some reason the library requires the infrared input to be through pin D2 (Took me forever to figure it out lol)

Step 4: Code

Use the file I have uploaded. It simply receives the infrared value and then spits out the value it received into the Serial Monitor as a string of numbers.

Note: You may have to delete the RobotIRRemote library in your arduino libraries folder if the arduino IDE compiler complains about it

Step 5: Use It!

Simply upload the code to your LinkIt ONE and then open the serial monitor and start sending it values using any infrared remote you have lying around the house!

Feel free to comment any problems you have, I am always willing to help out as best I can!

<p>Hi </p><p>Ive been trying the IR control on the linkit one for a while now and while I can get the Arduino to work the clock speed on the Linkit one is different so as yet I have had no luck. I have used the Library you list, Can you suggest anything from your trials as to what could be going wrong.</p><p>Thanks</p>
Are you using my code as well? or are you using your own
<p>Iv downloaded and used your code as a starting point but as yet not been able to get it to operate.</p><p>This is the error message</p><p>Warning: platform.txt from core 'MediaTek ARM7 EJ-S (32-bits) Boards' contains deprecated recipe.ar.pattern=&quot;{compiler.path}{compiler.ar.cmd}&quot; {compiler.ar.flags} &quot;{build.path}/{archive_file}&quot; &quot;{object_file}&quot;, automatically converted to recipe.ar.pattern=&quot;{compiler.path}{compiler.ar.cmd}&quot; {compiler.ar.flags} &quot;{archive_file_path}&quot; &quot;{object_file}&quot;. Consider upgrading this core.<br>In file included from C:\Users\HUKBMBEAR\Documents\Arduino\libraries\IR_Recv_LinkIt/IR_Recv_LinkIt.h:5:0,</p><p> from D:\Videos\Working_Reciever\Working_Reciever.ino:2:</p><p>C:\Users\HUKBMBEAR\AppData\Local\Arduino15\packages\LinkIt\hardware\arm\1.1.17\cores\arduino/Arduino.h:38:19: fatal error: vmdcl.h: No such file or directory</p><p> #include &quot;vmdcl.h&quot;</p><p> ^</p><p>compilation terminated.</p><p>exit status 1<br>Error compiling.</p><p>and this is your code</p><p>// test code for IR Recv LinkIt ONE<br>#include &lt;IR_Recv_LinkIt.h&gt;</p><p>int ir_dta[15];</p><p>void setup()<br>{<br> Serial.begin(9600);<br> Serial.println(&quot;Serial is working&quot;);<br> IR.begin(2); // initialize<br>} </p><p><br>void loop()<br>{<br> if(IR.isDta())<br> {<br> if(true)<br> {<br> IR.getDta(ir_dta);<br> Serial.print(&quot;code: &quot;);<br> for(int i = 0; i&lt;ir_dta[D_DATALEN]; i++)<br> {<br> Serial.print(ir_dta[D_DATA+i]);<br> }<br> Serial.println(&quot;&quot;); <br> }<br> }<br> delay(100);<br>}</p>
<p>Just tried compiling mine again and got errors as well...</p><p>When I made this instructable I was using arduino 1.6.4 and when I just tried compiling now i was using 1.6.5. It may be possible that the update killed the library so I would suggest you try downgrading to 1.6.4 and trying to compile again. Let me know if that works.</p>
<p>Thanks I was thinking along those lines will let you know</p>
<p>I actually just reinstalled the library and tried it again and it worked.... So I don't really know. Still let me know if downgrading works.</p>
<p>You could use this to set up remote controls for just about anything.</p>
<p>That's the idea :)</p>

About This Instructable

694views

7favorites

License:

More by Jaybuilder:Linkit ONE Keypad LinkIt ONE Flame Finder LinkIt ONE + IR Reciever 
Add instructable to: