crashboogie
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 http://www.raspberry-pi-geek.com/Archiv ... -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 blinking.py" 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?

blinking.py 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)
/boot/config

Code: Select all

# For more options and information see
# http://www.raspberrypi.org/documentation/configuration/config-txt.md
# Some settings may impact device functionality. See link above for details

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

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

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

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

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

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

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

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

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# 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)
dtparam=audio=on

# NOOBS Auto-generated Settings:
hdmi_force_hotplug=1
/etc/modules

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.

i2c-dev
lirc_dev
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
LIRCD_ARGS="--uinput"

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

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

#Try to load appropriate kernel modules
LOAD_MODULES=true

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

# Default configuration files for your hardware if any
LIRCD_CONF="/etc/lirc/lircd.conf"
LIRCMD_CONF=""
/etc/lirc/lircd.conf

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
  flags SPACE_ENC|CONST_LENGTH
  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


thegnnu
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 blinking.py 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.
TerryR

crashboogie
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 =/

crashboogie
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
http://www.raspberry-pi-geek.com/var/rp ... ghtbox.png

to this
https://cdn.instructables.com/F04/OYYA/ ... .LARGE.jpg

Now when I run blinking.py 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”