IR Remote Control on RaspberryPi
For a long time I’ve wanted to use my Pi as as WiFi controlled IR Remote. e.g Connect to it vi a WiFi and have it beam IR codes to any device that uses them.
With PiZero this becomes cheap and affordable to do.
i looked around and found that LIRC is the software needed to do this so I installed it mainly using this blog.
However, I seemed to find that the instructions were slightly unclear to me so let me jsut emphasse/add the stuff I did to get it going
Note – I cheated at first by just connecting transmitting diode direct to PiZero – you should really use a little transistor cct but since PiZero are £4 – i decided to risk it YMMV
Using Pin18(GPIO 23) for the receiver and Pin20(GPIO 24) for the transmitting diode.
Make sure /boot/config.txt has this line in it
If all goes well and you can record your remote then all thats needed to use it is to run
sudo irsend SEND_ONCE name_of_remote key
where name_of_remote is the one in your /etc/lirc/lircd.conf file and key is the code you want to send
To send these using ScratchGPIO then you can use
broadcast join (run sudo irsend SEND_ONCE name_of_remote ) (key)
and just change the value of key
IMPORTANT: make sure there is a space after name_of_remote
I’ve managed to put together an lircd.conf file for these GU10 type rgb bulb
# Please make this file available to others
# by sending it to <email@example.com>
# this config file was automatically generated
# using lirc-0.9.0-pre1(default) on Wed Dec 2 11:43:49 2015
# contributed by
# brand: /home/pi/lircd.conf
# model no. of remote control:
# devices being controlled by this remote:
header 9090 4442
one 639 1624
zero 639 517
repeat 9090 2206