Posts: 34
Joined: Thu Aug 04, 2016 4:03 am

Having trouble with LIRC and light not responding

Sat Apr 22, 2017 7:06 pm

I'm going off of this tutorial ... -IR-remote and I've got the Pi wired exactly as shown in the attached picture. Set up everything and LIRC seems to be working fine according to the sudo /etc/init.d/lirc status

Code: Select all

Apr 22 18:46:02 raspberrypi lirc[1028]: Loading LIRC modules:.
Apr 22 18:46:02 raspberrypi lirc[1028]: Starting remote control daemon(s) : LIRC :.
Apr 22 18:46:02 raspberrypi systemd[1]: Started LSB: Starts LIRC daemon..
But when I run either "irsend SEND_ONCE capture Power" or "sudo python" both run and give no errors but the light does not emit anything. Tried to hook it up to 3.3v as well as 5v power. Any suggestions of where to start? code

Code: Select all

01 #!/usr/bin/python
02 import RPi.GPIO as GPIO
03 import time
04 GPIO.setwarnings(False)
05 GPIO.setmode(GPIO.BCM)
06 GPIO.setup(22, GPIO.OUT)
07 while True:
08     GPIO.output(22, True)
09     time.sleep(1)
10     GPIO.output(22, False)
11     time.sleep(1)

Code: Select all

# For more options and information see
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border

# uncomment to force a console size. By default it will be display's size minus
# overscan.

# uncomment if hdmi display is not detected and composite is being output

# uncomment to force a specific HDMI mode (this will force VGA)

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display

# uncomment for composite PAL

#uncomment to overclock the arm. 700 MHz is the default.

# Uncomment some or all of these to enable the optional hardware interfaces

# Uncomment this to enable the lirc-rpi module
dtoverlay=lirc-rpi, gpio_out_pin=22

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)

# NOOBS Auto-generated Settings:

Code: Select all

# /etc/modules: kernel modules to load at boot time.
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

lirc_rpi, gpio_out_pin=22
/etc/lirc/hardware.conf (I saw multiple config files online that had LIRCD_CONF= as blank but changing it to LIRCD_CONF="/etc/lirc/lircd.conf" fixed my status to running after adding to it)

Code: Select all

# /etc/lirc/hardware.conf
# Arguments which will be used when launching lircd

#Don't start lircmd even if there seems to be a good config file

#Don't start irexec, even if a good config file seems to exist.

#Try to load appropriate kernel modules

# Run "lircd --driver=help" for a list of supported drivers.
# usually /dev/lirc0 is the correct setting for systems using udev 

# Default configuration files for your hardware if any

Code: Select all

# To find out how to get a proper configuration file please read:
#	/usr/share/doc/lirc/README.Debian

begin remote

  name  capture
  bits           16
  eps            30
  aeps          100

  header       8958  4431
  one           601  1623
  zero          601   511
  ptrail        601
  repeat       8961  2193
  pre_data_bits   16
  pre_data       0x8166
  gap          107228
  toggle_bit_mask 0x2020

      begin codes
          Power                    0x817E
          TempDown                 0x51AE
          Tempup                   0xA15E
          FanSpeed                 0x9966
          Timer                    0xF906
          Mode                     0xD926
      end codes

end remote

Posts: 157
Joined: Thu Oct 18, 2012 7:07 pm
Location: Bristol

Re: Having trouble with LIRC and light not responding

Sat Apr 22, 2017 7:28 pm

You have to stay with the program until you can see it blinking with a camera lcd or phone camera.
Until you see it blinking a dull grey/white light you are just wasting your time looking else where
have you tried reversing the led will not do any harm the wrong way around.
is the transistor emitter collector the correct way around.

Posts: 34
Joined: Thu Aug 04, 2016 4:03 am

Re: Having trouble with LIRC and light not responding

Sat Apr 22, 2017 8:54 pm

Already tried the LED both ways round, as well as the transistor, and already let the .py program run for ~60 seconds whilst viewing through the camera and still nothing =/

Posts: 34
Joined: Thu Aug 04, 2016 4:03 am

Re: Having trouble with LIRC and light not responding

Sat Apr 22, 2017 11:00 pm

Progressed a bit further. Rewired everything from this ... ghtbox.png

to this ... .LARGE.jpg

Now when I run it will blink but if I do "irsend SEND_ONCE capture Power" then it doesn't send anything. is because I've named it "Power" for the key name as opposed to what is in the list of button names?

Return to “General discussion”