Text Transfers using IR

Text Transfers using IR

2021, Nov 10    

IR (Infrared) Transmitter & Receiver Sensor အသုံးပြုပြီး Arduino ၂ခုကြားမှာ Text Transfer ပြုလုပ်ပေးတဲ့ Project လေးတစ်ခု ပြုလုပ်ကြည့်ကြပါမယ်။ စမ်းသပ်ပြုလုပ်ဖို့အတွက်ကတော့ အောက်ပါပစ္စည်းတွေ ၂ခုစီ လိုအပ်ပါမယ်။

  • Arduino Uno or Mega
  • IR Transmitter Sensor
  • IR Receiver Sensor
  • LCD 16x2 or 20x4
  • 8bit I/O Expander Module
  • USB 2.0 Female Header Adapter
  • USB or PS2 Keyboard
  • Jumper Wires

Arduino Mega သုံးတယ်ဆိုရင် အောက်ပါ Circuit Diagram အတိုင်း ချိတ်ဆက်နိုင်ပါတယ်။


Figure: Circuit Diagram with Arduino Mega

ပြီးရင် လိုအပ်မယ့် Library တွေကို ဒေါင်းလုပ်ရယူပြီး ထည့်ထားလိုက်ပါ။

Download require libraries

$ git clone https://github.com/Arduino-IRremote/Arduino-IRremote
 
$ git clone https://github.com/PaulStoffregen/PS2Keyboard

$ git clone https://github.com/WickedLukas/Newliquidcrystal_1.3.5

Library Installation

  • Open Arduino IDE (Arduino Software)

  • Sketch > Include Library > Add .Zip Library

  • and choose library zip file.

  • Done.

Arduino Uno အသုံးပြုတယ်ဆိုရင်တော့ IRremote Library ထဲမှာ အောက်ပါအတိုင်း configure လုပ်ပေးဖို့ လိုပါမယ်။ PS2Keyboard Library မှာ USB ရဲ့ Data Pin (D-) နဲ့ IRQ Pin (D+) တို့ကို Arduino Uno ရဲ့ Interrupt pin တွေ ဖြစ်တဲ့ Digital pin 2 နဲ့ 3 ကို အသုံးပြုထားတာ ဖြစ်လို့၊ ပြောင်းလဲပေးလို့ ရတဲ့ IR Transmitter Pin နံပါတ်ကို IRremote Library ထဲမှာ သွားပြောင်းပေးလိုက်တာ ဖြစ်ပါတယ်။ Arduino Mega သုံးရင်တော့ Library တွေထဲမှာ ဘာမှ ပြောင်းလဲပေးစရာ မလိုပါ

With Arduino Uno

If you use Arduino Uno, navigate to the following directory
/home/$USER/Arduino/libraries/Arduino-IRremote-master/src/private/
edit IRTimer.hpp as shown in the figure below and then Restart Arduino IDE.


Figure: IR_SEND_PIN ပြောင်းလဲခြင်း

Arduino Uno သုံးတဲ့သူတွေအတွက် Code ကတော့ အောက်ပါအတိုင်း ဖြစ်ပါတယ်။

Download all Sketches

$ git clone https://github.com/kogyikaunghtet/text-transfers-using-IR