Site Tools


Hotfix release available: 2025-05-14b "Librarian". upgrade now! [56.2] (what's this?)
Hotfix release available: 2025-05-14a "Librarian". upgrade now! [56.1] (what's this?)
New release available: 2025-05-14 "Librarian". upgrade now! [56] (what's this?)
parnu_elamine:smarthome.raspberry_pi

Info

Installation

# Raspberry confi wizardi kuvamine

sudo raspi-config

# GPIO Python library

sudo apt-get install python-rpi.gpio

# Adafruit Python GPIO library

cd /srv/smarthome/lib/external
git clone https://github.com/adafruit/Adafruit_Python_GPIO.git
cd Adafruit_Python_GPIO
sudo python setup.py install

Humidity sensors

cd /tmp/
git clone https://github.com/adafruit/Adafruit_Python_DHT.git
cd Adafruit_Python_DHT
sudo apt-get install build-essential python-dev
sudo python setup.py install
cd examples
# for PI
./AdafruitDHT.py 2302 4 
# for BBB
./AdafruitDHT.py 2302 P8_11

IR sending

sudo vim /etc/modules
lirc_dev
lirc_rpi gpio_in_pin=23 gpio_out_pin=22
sudo vi /etc/lirc/hardware.conf
########################################################
# /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=""
LIRCMD_CONF=""
########################################################
sudo vi /boot/config.txt
dtoverlay=lirc-rpi,gpio_in_pin=23,gpio_out_pin=22

sudo /etc/init.d/lirc restart

# add your IR codes to LIRC conf
sudo cp /srv/smarthome/config/lirc/led_stripes_44_button_remote.conf /etc/lirc/lircd.conf

irsend SEND_ONCE LED_STRIPE FADE3

SPI TFT LCD display

Unconfirmed other display options

Displaying info

Generating display image

convert -size 320x240 xc:black -pointsize 180 -density 90 -font Sawasdee-Regular -fill red -draw "text -15,166 '85'" /tmp/display_tmp1.png
convert -font Sawasdee-Regular -pointsize 50 -density 90 -fill "#8A0808" -draw "text 235,60 '°C'" /tmp/display_tmp1.png /tmp/display_tmp2.png
convert -font Sawasdee-Regular -pointsize 50 -density 90 -fill "#0404B4" -draw "text 10,240 '94%'" /tmp/display_tmp2.png /tmp/display_tmp3.png
convert -font Sawasdee-Regular -pointsize 50 -density 90 -fill "#CEE3F6" -draw "text 150,240 '20:38'" /tmp/display_tmp3.png /tmp/display.png
rm /tmp/display_tmp*

Muud suvalised lingid

PIR / motion detector

Õhurõhu andur

Ultrasonic sensor

Relay module

  • 5V 2 Channel Relay Module
parnu_elamine/smarthome.raspberry_pi.txt · Last modified: 2019/09/20 15:52 by 127.0.0.1