Infrared over GPIO (need help)

(sorry for text mistakes, english is not my language)

Hello,

I plan to connect a IR sensor to GPIO of the Rock5b,
so that I can control stuff e.g. volume, play/pause … in kodi by an IR remote.

For this, I use a general IR sensor, connected to 3.3V, GND and physical pin 3 (GPIO number 139) and a small IR remote.
This IR Reciver/Remote brand from Elgoo Arduino Uno R3 starter kit.

Following, what I did

My Experience (so far)

The Rock5b is my first SBC, and its really fun to figure it all out.
The only knowledge in GPIO is on non-SBC’s like ESP32, Arduino Nano, or Arduino Uno R3.

My GPIO knowledge on Rock5b is, to let a LED Blink, or let a LED light up, when push a button. (after wiring and run python script )

OS
On Rock5b I currently run RebornOS on nvme
but ubuntu or debian (raxda or armbian) version is also fine
(if RebornOS didn’t work for my use case)


Thanks for help

UPDATE

I got some progress.

  • change the connected PIN to 27 (GPIO number 150)
  • change the one wire from 3.3V to 5V

In python:
if I run this, I can now print out the code, that my remote send to the IR receiver. I configured it so, if I press up-button on my remote, the LED on the Breadboard light up, if I press down-button, the light tun off.

BUT I didn’t manage it, to control volume, and other things.

in Kotlin:
So I start the same thing in kotlin (I’m more familiar with java and kotlin)

My progress, if I register the GPIO like on Raxda Rock5b GPIO site I can following do

  • register Pin
  • unregister Pin
  • set pin direction to input or output
  • set pin value, („1” = LED light up / „0“ = LED light off)

The program currently lets the LED over GPIO blink

The next step for me, get IR to work in kotlin.

My github repo https://github.com/FijolaC/gpioTests