==== Info ==== * [[http://www.element14.com/community/servlet/JiveServlet/previewBody/68203-102-6-294412/GPIO.png|Pinout]] ==== 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 ==== * DHT11 & AM2302: https://learn.adafruit.com/dht-humidity-sensing-on-raspberry-pi-with-gdocs-logging/wiring * 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 ==== * ** http://alexba.in/blog/2013/01/06/setting-up-lirc-on-the-raspberrypi/** * 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 [[http://www.forum-raspberrypi.de/Thread-verschiedene-ir-transmitter-mit-lirc-multiple-transmitter-lirc-gpio-out?pid=139709|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: 240x320 2.4" SPI TFT LCD Serial Port Module+PBC Adapter Micro SD ILI9341 5V/3.3V (http://www.ebay.com/itm/231354972168) * **[[http://www.virtualfrontiers.co.uk/index_13.htm|Install & conf]]** === Unconfirmed other display options === * 2.4" 240x320 SPI (without board) | http://www.ebay.com/itm/231354979280 * 2.8"Inch 240x320 | http://www.ebay.com/itm/181625077737 * 3.2 inch 320x240 | 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 * [[http://ozzmaker.com/2012/11/23/raspberrypi-tft/|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 === * http://lallafa.de/blog/2013/03/watterott-mi0283qt-9a-display-for-the-rasbperry-pi/ * https://github.com/notro/fbtft/wiki/LCD-Modules#watterott-mi0283qt-9a * https://learn.adafruit.com/user-space-spi-tft-python-library-ili9341-2-8/overview * https://github.com/adafruit/Adafruit_Python_ILI9341 * http://marcosgildavid.blogspot.com/2014/02/getting-ili9341-spi-screen-working-on.html * http://direct.raspberrypi.org/forums/viewtopic.php?t=95554&p=664500 ==== PIR / motion detector ==== * HC-SR501: * https://learn.adafruit.com/adafruits-raspberry-pi-lesson-12-sensing-movement/parts * http://www.raspberrypi.org/learning/parent-detector/worksheet/ ==== Õhurõhu andur ==== * BMP180: https://learn.adafruit.com/using-the-bmp085-with-raspberry-pi/overview ==== Ultrasonic sensor ==== * HC-SR04: * https://www.modmypi.com/blog/hc-sr04-ultrasonic-range-sensor-on-the-raspberry-pi * http://www.bytecreation.com/blog/2013/10/13/raspberry-pi-ultrasonic-sensor-hc-sr04 ==== Relay module ==== * 5V 2 Channel Relay Module ==== Links ==== * http://blog.bn.ee/2013/01/11/building-a-real-time-transit-information-kiosk-with-raspberry-pi/ * http://www.instructables.com/id/Raspberry-Pi-Garage-Door-Opener/ (lisaks konkreetsele projektile räägib ka startup scriptide tegemisest ja GPIO juhtimisest)