Skip to content

dmat93/Project-AIR-URC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arduino IR Universal Remote Controller

Goal: to store, manually or by recording, and to send NEC codes through IR module

Setup

Devices

In my case I've used some low-cost component that you can easily find on the web. I bought them on AliExpress

Obviously you are not forced to use my same configuration, many other guides suggest to use single diodes as Tx and Rx instead modules.

Connections

Arduino-IR Connections

Code

Let's refer to the project you can find in projects/

Initialization of the recevier:

IRrecv irrecv(RECV_PIN)

Initialization of the sender:

IRsend irsend

Store the decoded results:

decode_results results

Optionaly we can store more signals, according to each button of a remote control for example, and then we can send different signal pushing different buttons.

Get the value of the decoded signal

results.value [unsigned long]

Get the number of bits of the decoded signal

results.bit [int]

Send the received signal using value and number of bits

irsend.sendNEC(code_value,code_bits); It is better to use NEC codes to be sure We can store the number of bit of the recevied signal into a variable and then we can use it to send the signal

Considerations

Send function

IRsend.sendRC5(unsigned long data, int n_bits)

Decode funtion

IRrecv.decode(&decode_results results)

Applications

  • Remote Controller

Improvements

  • Store more decoded signals
  • Assign a button to a signal
  • Integration of display
  • (...)

mattiaquadrini@gmail.com