라즈베리파이 홈 오토메이션3. Raspberry Pi
• 2006년 초기 컨셉이 시작됨(Eben Upton)
• 2012년 2월 말 판매 시작
• 2012년 4월 부터 구매자에게 배송 시작
• 2013년 초에 1,000,000 대 판매
• 2013년 2월부터 Model A버전을 개발 판매 시작
(라즈베리파이 B+)
5. Raspberry Pi
• 오픈소스 = 다양한 커뮤니티
• 저전력 (A버전 = 2.5w, B버전 = 3.5w)
• OS탑재
• 다양한 언어 지원
• 가성비
(라즈베리파이 B+)
7. Groove -
Relay
멀티탭
유선랜
1.0mm 전선
합판
점퍼선, 리드선
빵판
전등 ON!!!
더 나아가
• 유선랜 -> 무선랜
• SD -> Micro or B+구입
• 빵판 -> 만능기판 납땜
Pi Home Component
8. Raspberry Pi
• Device Version : B (512MB)
• OS : 라즈비안
• Language : Python, html
• Library : Webiopi
10. Index.html
webiopi().ready(function() {
var content, button;
content = $("#content");
// Control Heating Pad for GPIO 18
button = webiopi().createGPIOButton(18, "전등");
content.append(button); //append button to content div
webiopi().refreshGPIO(true);
button = webiopi().createGPIOButton(23, "장판”);
content.append(button);
webiopi().refreshGPIO(true);
});
Script.py
GPIO = webiopi.GPIO
LAMP = 18
HEATSIT = 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)