2016-12-22 6 views
0

Ich versuche, die Klimaanlage Kontrollsystem zu bauen, die mir erlauben wird, die ac mit Web-App zu steuern. Bis jetzt habe ich dasselbe mit Arduino gemacht und es funktionierte für diese spezielle Klimaanlage. Ich könnte Signale senden und empfangen, daher glaube ich nicht, dass es Probleme mit der Hardware gibt. Bis jetzt gibt mir irsend keine Fehler, aber das Signal wird nicht gesendet, obwohl ich einige LED-Testcodes mit Python ausprobiert habe und es funktioniert. Hier ist die/etc/modules:irsend gibt keine Fehler, aber sendet kein Signal auf Raspbian

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

Hier ist die /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="" 
    ######################################################## 

Und /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 

Kann jemand eine Idee wie in warum wird Signal nicht gesendet? Die Verbindung scheint korrekt zu sein, 22 GPIO, aber für Python-Code 15 verwendet, wenn seine Arbeits zu überprüfen:

#!/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. Ich habe versucht, 22 zu 15 zu wechseln, habe nicht geklappt. :(

Antwort

0

den Fehler gefunden wurde Raspberry Pi Lesen nicht meine/etc/modules so, wenn ich die gleichen Daten in /etc/modules-load.d/lirc_rpi.conf gespeichert, es hat funktioniert:

lirc_dev 
lirc_rpi gpio_in_pin=22 gpio_out_pin=23 

i2c-dev 
Verwandte Themen