Arduino     紅外線遙控       Cooper Maa德明 Arduino 開發經驗分享 - 2011
Arduino          ARRRR, // DWEE, just say "do we“ fast /       / NO, as in no.”ARRR-DWEE-NO”
What is Arduino?• Open Source   + Software IDE + Community  Hardware
What is for today?•   接收紅外線訊號•   A Simple DIY IR Decoder•   發射紅外線訊號•   DIY Keypad Remote Control
Infrared Remote Control• 非常普遍使用的無線通訊• 用於電視、冷氣、DVD Player、MP3 Player, 玩  具遙控車等各種設備的控制
Arduino & IRRemote• With Arduino & IRRemote Library, you can  make your own infrared applications.
What you need?• First, you need an Arduino board and an  USB cable
What you need?• Second, you need Arduino IDE to write  program
What you need?• Third, an infrared receiver and a 940 nm  Infrared LED (a.k.a Infrared Emitter)
What you need?• Last, download and install IRRemote  Library: http://goo.gl/2HKLm
Make sure things work• Load "File > Examples > 1.Basics > Blink"
Examples used in this opentalk• For your convenience, the examples used  in this opentalk has been uploaded to  google doc...
What is for today?•   接收紅外線訊號•   A Simple DIY IR Decoder•   發射紅外線訊號•   DIY Keypad Remote Control
接收紅外線訊號• The wiring:
接收紅外線訊號• Load "File > Sketchbook > IRRemoteExamples > Example1_1"
接收紅外線訊號• Try your remote:
接收紅外線訊號• Open Serial Monitor and see the result:
Four steps to receive Infrared signals 1. 引用 IRRemote 函式庫:   #include <IRremote.h> 2. 建立 IRrecv 物件及 decode_results變數:   co...
decode_results structure• The structure of decode_results
decode_results structure• The structure of decode_results
顯示紅外線協定種類• Load "File > Sketchbook > IRRemoteExamples > Example1_2"
顯示紅外線協定種類• Open Serial Monitor and see the result:
Infrared LED Indicator• Load "File > Sketchbook > IRRemoteExamples > Example1_3v2"
Infrared LED Indicator• The infrared LED indicator will blink when  infrared signal is received.
What is for today?•   接收紅外線訊號•   A Simple DIY IR Decoder•   發射紅外線訊號•   DIY Keypad Remote Control
A simple DIY IR Decoder• http://coopermaa2nd.blogspot.com/2011/03/14-lcd-ir-decoder.html• The Wiring:
A simple DIY IR Decoder• Load from http://goo.gl/2qFfC
A simple DIY IR Decoder• The result of decoded infrared signals will  shown on the LCD:
What is for today?•   接收紅外線訊號•   A Simple DIY IR Decoder•   發射紅外線訊號•   DIY Keypad Remote Control
發射紅外線訊號• The wiring (IR LED 一定要接在 pin 3):
發射紅外線訊號• Load "File > Sketchbook > IRRemoteExamples > Example2_1"
Three steps to send Infrared signals1. 引用 IRRemote 函式庫:  #include <IRremote.h>2. 建立 IRsend 物件:  IRsend irsend;          //...
DIY Keypad Remote Control• http://coopermaa2nd.blogspot.com/2011/04/22-keypad.html• The Wiring:
DIY Keypad Remote Control• Load from http://goo.gl/Tr4a7
DIY Keypad Remote Control• Now you have made a simple Remote Control  using Keypad and just a simple infrared LED:
Questions?
References• IRRemote 紅外線遙控教學• 紅外線遙控原理與 NEC IR Protocol• WinLIRC 紅外線遙控電腦
Upcoming SlideShare
Loading in …5
×

Arduino i rremote 1112

5,357 views

Published on

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
5,357
On SlideShare
0
From Embeds
0
Number of Embeds
3,546
Actions
Shares
0
Downloads
39
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Arduino i rremote 1112

  1. 1. Arduino 紅外線遙控 Cooper Maa德明 Arduino 開發經驗分享 - 2011
  2. 2. Arduino ARRRR, // DWEE, just say "do we“ fast / / NO, as in no.”ARRR-DWEE-NO”
  3. 3. What is Arduino?• Open Source + Software IDE + Community Hardware
  4. 4. What is for today?• 接收紅外線訊號• A Simple DIY IR Decoder• 發射紅外線訊號• DIY Keypad Remote Control
  5. 5. Infrared Remote Control• 非常普遍使用的無線通訊• 用於電視、冷氣、DVD Player、MP3 Player, 玩 具遙控車等各種設備的控制
  6. 6. Arduino & IRRemote• With Arduino & IRRemote Library, you can make your own infrared applications.
  7. 7. What you need?• First, you need an Arduino board and an USB cable
  8. 8. What you need?• Second, you need Arduino IDE to write program
  9. 9. What you need?• Third, an infrared receiver and a 940 nm Infrared LED (a.k.a Infrared Emitter)
  10. 10. What you need?• Last, download and install IRRemote Library: http://goo.gl/2HKLm
  11. 11. Make sure things work• Load "File > Examples > 1.Basics > Blink"
  12. 12. Examples used in this opentalk• For your convenience, the examples used in this opentalk has been uploaded to google doc, you can download the examples from the following url: http://goo.gl/KSOu6
  13. 13. What is for today?• 接收紅外線訊號• A Simple DIY IR Decoder• 發射紅外線訊號• DIY Keypad Remote Control
  14. 14. 接收紅外線訊號• The wiring:
  15. 15. 接收紅外線訊號• Load "File > Sketchbook > IRRemoteExamples > Example1_1"
  16. 16. 接收紅外線訊號• Try your remote:
  17. 17. 接收紅外線訊號• Open Serial Monitor and see the result:
  18. 18. Four steps to receive Infrared signals 1. 引用 IRRemote 函式庫: #include <IRremote.h> 2. 建立 IRrecv 物件及 decode_results變數: const int irReceiverPin = 2; // 紅外線接收器 VOUT 腳位 IRrecv irrecv(irReceiverPin); // 用來接收紅外線訊號 decode_results results; // 用來存放解碼結果 3. 啟動紅外線解碼: irrecv.enableIRIn(); // 啟動紅外線解碼 4. 檢查有沒收到紅外線: if (irrecv.decode(&results)) { // 解碼成功…
  19. 19. decode_results structure• The structure of decode_results
  20. 20. decode_results structure• The structure of decode_results
  21. 21. 顯示紅外線協定種類• Load "File > Sketchbook > IRRemoteExamples > Example1_2"
  22. 22. 顯示紅外線協定種類• Open Serial Monitor and see the result:
  23. 23. Infrared LED Indicator• Load "File > Sketchbook > IRRemoteExamples > Example1_3v2"
  24. 24. Infrared LED Indicator• The infrared LED indicator will blink when infrared signal is received.
  25. 25. What is for today?• 接收紅外線訊號• A Simple DIY IR Decoder• 發射紅外線訊號• DIY Keypad Remote Control
  26. 26. A simple DIY IR Decoder• http://coopermaa2nd.blogspot.com/2011/03/14-lcd-ir-decoder.html• The Wiring:
  27. 27. A simple DIY IR Decoder• Load from http://goo.gl/2qFfC
  28. 28. A simple DIY IR Decoder• The result of decoded infrared signals will shown on the LCD:
  29. 29. What is for today?• 接收紅外線訊號• A Simple DIY IR Decoder• 發射紅外線訊號• DIY Keypad Remote Control
  30. 30. 發射紅外線訊號• The wiring (IR LED 一定要接在 pin 3):
  31. 31. 發射紅外線訊號• Load "File > Sketchbook > IRRemoteExamples > Example2_1"
  32. 32. Three steps to send Infrared signals1. 引用 IRRemote 函式庫: #include <IRremote.h>2. 建立 IRsend 物件: IRsend irsend; // 定義 IRsend 物件來發射紅外線訊號3. 呼叫對應的 sendXXX() 函式發射紅外線訊號: irsend.sendNEC(0x4FB48B7, 32); // 記得換成你的紅外線編碼
  33. 33. DIY Keypad Remote Control• http://coopermaa2nd.blogspot.com/2011/04/22-keypad.html• The Wiring:
  34. 34. DIY Keypad Remote Control• Load from http://goo.gl/Tr4a7
  35. 35. DIY Keypad Remote Control• Now you have made a simple Remote Control using Keypad and just a simple infrared LED:
  36. 36. Questions?
  37. 37. References• IRRemote 紅外線遙控教學• 紅外線遙控原理與 NEC IR Protocol• WinLIRC 紅外線遙控電腦

×