B4R Question IRremote - how to send

derez

Expert
Licensed User
Longtime User
I have successfully decoded a remote signal - NEC (1) with value 551489775.
Now I want to send it by the ESP instead of the remote. How do I tell the application what to send ? I use sendNEC but what is m built of ?

I have another remote (the AC control !) which gives an unknown result and the values are inconsistent, so it needs a raw data to be logged and then sent. How can I do that ?
 

derez

Expert
Licensed User
Longtime User
Hello @derez ;
could you share for us IR circuit with ardiuno (ESP) board.
IMG_20161018_135322.jpg

B4X:
 ...
ir.Initialize(d1.D6, "ir_Decoded") 'receiver is connected to pin 6, GND and 5v (or 3.3v on ESP8266)
   ir.Enable
   pinbtn.Initialize(d1.D1, pinbtn.MODE_INPUT_PULLUP)   ' pin 3
   pinbtn.AddListener("StateChangedSub")
   irsend.Enable(d1.D2, 38) 'frequency = 38khz  pin 4
...
I use d1.D1 and d1.D2 for pins 3 & 4 because this is how my Chinese Wemos D1 likes it...

It is fixed.
It works in the application but not for the accessory...
When I use irsend.SendNEC it works (a TV) but not with the RawBuffer. I guess there are more parameters involved. Actually I am not going to use anything like controlling my AirCondition or TV away from home, so I put this issue aside.
Thank you :)
 
Last edited:
Upvote 0

Tayfur

Well-Known Member
Licensed User
Longtime User
View attachment 49142
B4X:
 ...
ir.Initialize(d1.D6, "ir_Decoded") 'receiver is connected to pin 6, GND and 5v (or 3.3v on ESP8266)
   ir.Enable
   pinbtn.Initialize(d1.D1, pinbtn.MODE_INPUT_PULLUP)   ' pin 3
   pinbtn.AddListener("StateChangedSub")
   irsend.Enable(d1.D2, 38) 'frequency = 38khz  pin 4
...
I use d1.D1 and d1.D2 for pins 3 & 4 because this is how my Chinese Wemos D1 likes it...


It works in the application but not for the accessory...
When I use irsend.SendNEC it works (a TV) but not with the RawBuffer. I guess there are more parameters involved. Actually I am not going to use anything like controlling my AirCondition or TV away from home, so I put this issue aside.
Thank you :)
Great! thanks for sharing

I like Wemos and I use it.
 
Upvote 0

petr4ppc

Well-Known Member
Licensed User
Longtime User
Dear friends, please for advice,

I am using derez circuit and IRremoteESP8266 library 1.13.

With
B4X:
Private Sub ir_Decoded (Result As IrResult)
   Log("result: ", Result.DecodeType, "- ", Result.Value, "-",Result.RawBuffer.Length)
   For x=0 To 20
    Log(Result.RawBuffer(x)) 
   Next
End Sub

I get:
result: 3 - 1151 - 24
20
18
19
35
36
35
19
18
19
18
36
18
19
18
18
18
19
18
19
18
19

Value 3 in result is: #define /*Int NEC;*/ IrResult_NEC 3

For sending I use:
B4X:
Dim m As ULong =1151
irsend.SendNEC(m,32)

I see that IR LED is flashed, but in PHILIPS audio system is not reaction. This same situation I have with RC5.
Please what I am doing wrong?

Wemos D1R2
Thank you
p4ppc
 
Upvote 0
Top