Page 1 of 1

Infrared interface VS1838B

Posted: Mon Sep 13, 2021 11:50 am
by Fernando Perez
I need some advice. I have received a couple of VS1838B infrared receivers. I have connected one according to Annex help manual:
[Local Link Removed for Guests]
(only the receiver) and the program returns a different value every time I press the same key on a remote control of any of all the ones I have found around my house.
I have tried Panasonic, LG, Sony, Denon remotes, etc.
ir.get$ always different, with the same key and ir.get$(1) always -1 with any remote control of any brand.
I have tried inserting a 100 ohm resistor and a 4.7 microfarads capacitor, according to the VS1838B datasheet, with no improvement.
I have traded the VS1838Bs that I have, and neither.
The worst thing is that both modules work perfectly with the Arduino IDE and David Conran's IRremoteESP8266 library.

Re: Infrared interface VS1838B

Posted: Mon Sep 13, 2021 11:59 am
by cicciocb
Hi Fernando,
you should try with another pin on the module and / or with the ESP32.

Re: Infrared interface VS1838B

Posted: Mon Sep 13, 2021 12:08 pm
by Fernando Perez
Right now I try. I am with a Wemos D1 mini, I will test with other GPIOs and then move on to ESP32.
Thanks Cicciocb

Re: Infrared interface VS1838B

Posted: Mon Sep 13, 2021 12:56 pm
by Fernando Perez
I feel shame. How have I been able to hit one of the two pins that does not have interrupts (16) or that cannot be used as an input (15)?
It works perfectly. Also, sorry make you waste your time with these old things. :cry:

Code: [Local Link Removed for Guests]

' Wemos D1 mini:
D0 = 16 ' Fail
D1 = 5  ' Ok
D2 = 4  ' Ok
D3 = 0  ' Ok
D4 = 2  ' Ok
D5 = 14 ' Ok
D6 = 12 ' Ok
D7 = 13 ' Ok
D8 = 15 ' Fail 

ir.init D3
OnInfrared irReceived
wait

irReceived:
  wlog "Code "; ir.get$
  wlog "Type "; ir.get$(1)
  wlog "Address "; ir.get$(2)
  wlog "Cmd "; val("&h" + ir.get$(3))
  wlog "??4 = "; ir.get$(4)
  wlog "??5 = "; ir.get$(5)
  pause 200
return

Re: Infrared interface VS1838B

Posted: Mon Sep 13, 2021 3:33 pm
by cicciocb
This is a good news.
Maybe it worth to add this information in the documentation.