Jump to content

Orange Pi Zero mainline kernel - Support for IR infrared remote Shield V1.0 expansion Transceivers Module for Raspberry pi B


Donkey

Recommended Posts

Hello, 

 

I want to provide support for IR infrared remote Shield V1.0 for orange pi zero and I need some help to know how to proceed. 

http://www.ebay.com/itm/IR-infrared-remote-Shield-V1-0-expansion-Transceivers-Module-for-Raspberry-pi-B-/291205297766

Signal RPi_connector(P4)
Button1 -> Pin13
Button2 -> Pin15
IR_IN -> Pin11
IR_OUT -> Pin12

 

Hardware Details:

Hardware: Orange Pi Zero 512                 

                 IR Remote shield v1.0 connected to 2x13 Header

OS: Armbian Mainline  (Ubuntu_xenial_dev_4.11.7), This is mandatory for me as I want docker support.

 

I have started reading Device Tree overlay documentation and I would say the best way to proceed would be to add a custom overlay, but I need some help in how to approach that and maybe better understanding how to make it work.

https://docs.armbian.com/User-Guide_Allwinner_overlays/#device-tree-overlays

Using custom overlays

  1. Check here for some example overlays
  2. Copy or create your overlay file (with .dts extension) on the device
  3. Change I2C or SPI bus number, GPIO and pinctrl pins, compatible string to match your SoC if necessary
  4. Compile and activate the overlay by running armbian-add-overlay <overlay_file.dts> as root, i.e. sudo armbian-add-overlay sht15.dts
  5. Reboot

 

*** (note the IR remote shield has to be connected respecting the 180º flip) ***

http://linux-sunxi.org/Xunlong_Orange_Pi_Zero

 

The idea is to have lirc working and capture codes without using buttons, just using IR TX and IR RX.

There should be a /dev/lirc0 device so to run $ mode -d /dev/lirc0  Or $ irrecord... to capture and record remote control devices codes.

 

Am I in the right path?, Is there any other way to do it in mainline kernel?, How would you do it?

Cheers,

 

 

Link to comment
Share on other sites

By now I have been able to record remote controls codes using this example. 

http://feijoa.jp/laboratory/raspberrypi/infrared/  (Japanese)

 

For loading the wiring pi I built wiringPi version you'll find in the following github repository.

#include <wiringPi.h>

https://github.com/xpertsavenue/WiringOP-Zero

 

Next steps, would be to build an IR module like lirc-rpi to be able to map gpio pins to lirc, but there is one test I want to do first which is trying to map spidev1.0 to the in and out ports of the board and see what happens.

 

I don't know if this is possible disabling modules using the same pins and adding a custom overlay based on the spidev1.0 but changing pins.

 

The question is: Am I crazy?.

 

I know I need to read more,  but some help would be very much appreciated.

 

Link to comment
Share on other sites

Thanks Martin!!  I discard then using SPI, it was not so clean anyway.

I am now considering porting lirc-rpi to orange pi using wiringpi.h.

 

I will base my code in this improved version of lirc_rpi.

https://github.com/bengtmartensson/lirc_rpi/blob/master/lirc_rpi.c

 

Moving to this direction I am now reading how to activate INT7 in the ir reception pin.

12 SIM_CLK/PA_EINT7 / PA07 / GPIO7

 

I found that post about it

https://forum.armbian.com/index.php?/topic/4787-gpio-pa19-hardware-interrupts/

 

I also have to investigate how wiringpi.h works, is it a C native code or is it Python?. 

I found a post once talking about, how to use native C libraries of wiringpi.

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines