irsend 没有给出错误,但没有在 Raspbian 上发送信号

irsend is not giving errors, but does not send signal on Raspbian

我正在尝试构建空调控制系统,这将使我能够使用网络应用程序控制空调。 到目前为止,我已经对 Arduino 做了同样的事情,并且它适用于这种特殊的空调。我可以发送和接收信号,所以我认为硬件没有任何问题。 到目前为止,irsend 没有给我任何错误,但没有发送信号,尽管我使用 python 尝试了一些 LED 测试代码并且它有效。 这是 /etc/modules:

# /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_dev
lirc_rpi gpio_out_pin=22

这里是 /etc/lirc/hardware.conf:

########################################################
    # /etc/lirc/hardware.conf
    #
    # Arguments which will be used when launching lircd
    #
    LIRCD_ARGS=""
    #
    # 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
    #changed for true
    LIRCD_CONF="/etc/lirc/lircd.conf"
    LIRCMD_CONF=""
    ########################################################

和/boot/config.txt:

    # 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 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

谁能知道为什么没有发送信号?连接似乎是正确的,22 gpio,但是对于 python 代码使用 15 来检查它是否工作:

#!/usr/bin/python

import RPi.GPIO as GPIO
import time

GPIO.setmode(GPIO.BOARD)
GPIO.setup(15, GPIO.OUT)

for i in range(0,10):
        GPIO.output(15,True)
        time.sleep(0.5)
        GPIO.output(15,False)
        time.sleep(0.5)
print "Done"
GPIO.cleanup()

P.S。我试图将 22 更改为 15,但没有成功。 :(

发现错误,Raspberry Pi 没有读取我的 /etc/modules 所以当我在 /etc/modules-load.d/lirc_rpi.conf 中保存相同的数据时,它起作用了:

lirc_dev
lirc_rpi gpio_in_pin=22 gpio_out_pin=23

i2c-dev