INFRARED []

Outils pour utilisateurs

Outils du site


INFRARED

Ceci est une ancienne révision du document !


INFRARED

PINOUT / WIRING


SOFTWARE CONFIGURATION

Python Blinking LED Script

#!/usr/bin/python
import RPi.GPIO as GPIO
import time
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
GPIO.setup(22, GPIO.OUT)
while True:
    GPIO.output(22, True)
    time.sleep(1)
    GPIO.output(22, False)
    time.sleep(1)

LIRC

Install LIRC

sudo apt-get install lirc

Enable and configure the lirc_rpi kernel module.

sudo nano /etc/modules

Add the lines below to the file

useless

lirc_dev
lirc_rpi gpio_out_pin=22

gpio_out_pin parameter points to the pin controlling the IR LED

Edit '/etc/lirc/hardware.conf', and add

LIRCD_ARGS="--uinput"
LOAD_MODULES=true
DRIVER="default"
DEVICE="/dev/lirc0"
MODULES="lirc_rpi"
LIRCD_CONF=""
LIRCMD_CONF=""

/boot/config.txt

dtoverlay=gpio-ir,gpio_pin=18
dtoverlay=gpio-ir-tx,gpio_pin=22

/etc/lirc/lirc_options.conf

driver          = default 
device          = /dev/lirc0

Reboot

sudo reboot

LIRC SEND COMMANDS

documentation/informatique/raspberrypi/infrared/index.1663259395.txt.gz · Dernière modification : de f1sls