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
Table of Contents
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
- library install shortly:
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
- Skeem IR saatja ja vastuvõtja ühendamiseks Raspberry peal: http://upverter.com/alexbain/f24516375cfae8b9/Open-Source-Universal-Remote/embed_img/13702922880000/
- mitme IR saatja toega LIRC'i kompileerimine: http://idrisr.com/blog/2014/05/29/compiling-a-custom-linux-kernel-with-lirc-multi-gpio-output-enabled-for-the-raspberry-pi/
- ei tea, kas vaja, aga räägib midagi uue kerneli juures vaja olevast muutusest link
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
- Model: 240×320 2.4“ SPI TFT LCD Serial Port Module+PBC Adapter Micro SD ILI9341 5V/3.3V (http://www.ebay.com/itm/231354972168)
Unconfirmed other display options
- 2.4” 240×320 SPI (without board) | http://www.ebay.com/itm/231354979280
- 2.8“Inch 240×320 | http://www.ebay.com/itm/181625077737
- 3.2 inch 320×240 | http://www.ebay.com/itm/321144619355
- 3.5” Raspberry Pi LCD Module 320×480 | http://www.ebay.com/itm/161643938962
Displaying info
- sudo fbi -noverbose -T 1 -a -d /dev/fb1 /tmp/display.png
- Info piltide ja brauseri näitamiseks teise display peal (muu info seal ei ole oluline!)
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
- HC-SR501:
Õhurõhu andur
Ultrasonic sensor
- HC-SR04:
Relay module
- 5V 2 Channel Relay Module
Links
- http://www.instructables.com/id/Raspberry-Pi-Garage-Door-Opener/ (lisaks konkreetsele projektile räägib ka startup scriptide tegemisest ja GPIO juhtimisest)
parnu_elamine/smarthome.raspberry_pi.txt · Last modified: 2019/09/20 15:52 by 127.0.0.1
