WebIOPi 설치
페이지 정보

본문
http://webiopi.trouch.com/INSTALL.html
https://github.com/doublebind/raspi
$ sudo raspi-config -> Interfacing Options -> Remote GPIO
$ wget http://sourceforge.net/projects/webiopi/files/WebIOPi-0.7.1.tar.gz
$ tar xvzf WebIOPi-0.7.1.tar.gz
$ cd WebIOPi-0.7.1
패치1
$ wget https://raw.githubusercontent.com/doublebind/raspi/master/webiopi-pi2bplus.patch
$ patch -p1 -i webiopi-pi2bplus.patch
$ cd python/native/gpio.c
#include <unistd.h> 추가
$ cpuinfo.c
fgets(buffer, sizeof(buffer) , fp)
위부분을 아래와 같이 수정
if ( fgets(buffer, sizeof(buffer) , fp) == NULL)
return 0;
$ sudo ./setup.sh
$ reboot
$ /etc/init.d/webiopi start
----------------------------------------
시작과 실행
/etc/init.d/webiopi start
/etc/init.d/webiopi stop
디버그 모드 실행
$ sudo webiopi -c /etc/webiopi/config -d
부팅시 자동실행
sudo update -rc.d webiopi defaults
sudo update -rc.d webiopi remove
How to Start WebIOPi (서비스로 등록하기)
Follow the steps below if Raspbian is installed by NOOBS later than 1.4.2.
$ cd /etc/systemd/system/
$ sudo wget https://raw.githubusercontent.com/doublebind/raspi/master/webiopi.service
$ sudo systemctl start webiopi
$ sudo systemctl enable webiopi
----------------------------------------
$ netstat -na | more <- 포트확인
======================================================
브라우저 : http://IP:8000 접속하여 확인
webiopi / raspberry 로 로그인
설정파일 : /etc/webiopi/config
기본주소 : /usr/share/webiopi/htdocs/
자신의 파이썬 스크립트 작성시
/etc/webiopi/config : 스크립트 경로 지정
myscript = /home/pi/webiopi/myscript.py
접속암호변경하기
$ sudo webiopi-passwd
- 이전글한글설정과 가상키보드 20.10.21
- 다음글온습도 센서 연결하기 20.10.08
댓글목록
등록된 댓글이 없습니다.