라즈베리파이 홈 오토메이션
DESCRIPTION
Pi HomeTRANSCRIPT
Raspberry Pi 로 만드는홈 오토메이션
Device Home
Pi Home
Hmm…
Raspberry Pi
• 2006 년 초기 컨셉이 시작됨 (Eben Upton)• 2012 년 2 월 말 판매 시작• 2012 년 4 월 부터 구매자에게 배송 시작• 2013 년 초에 1,000,000 대 판매• 2013 년 2 월부터 Model A 버전을 개발 판매
시작
( 라즈베리파이 B+)
Raspberry Pi
Raspberry Pi
• 오픈소스 = 다양한 커뮤니티• 저전력 (A 버전 = 2.5w, B 버전 = 3.5w)• OS 탑재• 다양한 언어 지원• 가성비
( 라즈베리파이 B+)
Device Home
Pi Home
Groove - Re-lay
멀티탭
유선랜
1.0mm 전선
합판
점퍼선 , 리드선
빵판
더 나아가
• 유선랜 -> 무선랜
• SD -> Micro or B+ 구입
• 빵판 -> 만능기판 납땜
전등 ON!!!
Pi Home Component
• Device Version : B (512MB)
• OS : 라즈비안
• Language : Python, html
• Library : Webiopi
Raspberry Pi
http://라즈베리파이ip:8000
User name : webiopiPassword: raspberry
Webiopi
webiopi().ready(function() {
var content, button; content = $("#content");
// Control Heating Pad for GPIO 18button = webiopi().createGPIOButton(18, "전등 ");
content.append(button); //append button to content div
webiopi().refreshGPIO(true);
button = webiopi().createGPIOButton(23, "장판” );content.append(button);
webiopi().refreshGPIO(true); });
Index.html
GPIO = webiopi.GPIO
LAMP = 18HEATSIT = 23
def setup(): webiopi.debug("Script with macros - Setup") # Setup GPIOs GPIO.setFunction(LAMP, GPIO.OUT) GPIO.setFunction(HEATSIT, GPIO.OUT)def loop():
webiopi.sleep(1)
def destroy():GPIO.digitalWrite(LAMP, GPIO.LOW)GPIO.digitalWrite(HEATSIT, GPIO.LOW)
Script.py
In Future
Q&A