Rancang Bangun Sistem Monitoring Ruangan Dengan Server Raspberry Pi
Raspberry Pi dan Alat Parkir UI
-
Upload
zakiakhmad -
Category
Technology
-
view
1.589 -
download
9
description
Transcript of Raspberry Pi dan Alat Parkir UI
![Page 1: Raspberry Pi dan Alat Parkir UI](https://reader035.fdokumen.com/reader035/viewer/2022081715/54034bf98d7f72de4c8b45d4/html5/thumbnails/1.jpg)
Raspberry Pi danAlat Parkir UIGladhi Guarddin, [email protected]
![Page 2: Raspberry Pi dan Alat Parkir UI](https://reader035.fdokumen.com/reader035/viewer/2022081715/54034bf98d7f72de4c8b45d4/html5/thumbnails/2.jpg)
Tujuan Implementasi● Raspberry Pi sebagai pengendali proses pengambilan data kendaraan
pada gerbatama UI● Setiap gambar yang dicapture akan diolah oleh aplikasi terpisah
![Page 3: Raspberry Pi dan Alat Parkir UI](https://reader035.fdokumen.com/reader035/viewer/2022081715/54034bf98d7f72de4c8b45d4/html5/thumbnails/3.jpg)
![Page 4: Raspberry Pi dan Alat Parkir UI](https://reader035.fdokumen.com/reader035/viewer/2022081715/54034bf98d7f72de4c8b45d4/html5/thumbnails/4.jpg)
![Page 5: Raspberry Pi dan Alat Parkir UI](https://reader035.fdokumen.com/reader035/viewer/2022081715/54034bf98d7f72de4c8b45d4/html5/thumbnails/5.jpg)
Wiring Sensor
![Page 6: Raspberry Pi dan Alat Parkir UI](https://reader035.fdokumen.com/reader035/viewer/2022081715/54034bf98d7f72de4c8b45d4/html5/thumbnails/6.jpg)
Raspberry in a Box
![Page 7: Raspberry Pi dan Alat Parkir UI](https://reader035.fdokumen.com/reader035/viewer/2022081715/54034bf98d7f72de4c8b45d4/html5/thumbnails/7.jpg)
Rangkaian in a Pipe {bomb}
VCC 3.3V
GND
GPIO pin X
![Page 8: Raspberry Pi dan Alat Parkir UI](https://reader035.fdokumen.com/reader035/viewer/2022081715/54034bf98d7f72de4c8b45d4/html5/thumbnails/8.jpg)
Rangkaian in a Pipe {bomb}
VCC 3.3V GPIO pin 8
GPIO pin 10
GPIO pin 12
GPIO pin 16
GND
![Page 9: Raspberry Pi dan Alat Parkir UI](https://reader035.fdokumen.com/reader035/viewer/2022081715/54034bf98d7f72de4c8b45d4/html5/thumbnails/9.jpg)
Konsep Rangkaian GPIO● Normally True● Pull UP, nanti down kalau di short circuit dengan Ground● Mengapa perlu di Pull UP ? karena status GPIO nya adalah “Floating”
![Page 10: Raspberry Pi dan Alat Parkir UI](https://reader035.fdokumen.com/reader035/viewer/2022081715/54034bf98d7f72de4c8b45d4/html5/thumbnails/10.jpg)
Konsep Aplikasi
Python Controllerread from GPIO
Execute Shell (background) &
Execute Shell (background) &
Execute Shell (background) &
Execute Shell (background) &
capture jpg from IP Camera
capture jpg from IP Camera
capture jpg from IP Camera
capture jpg from IP Camera
![Page 11: Raspberry Pi dan Alat Parkir UI](https://reader035.fdokumen.com/reader035/viewer/2022081715/54034bf98d7f72de4c8b45d4/html5/thumbnails/11.jpg)
Python Codefrom time import sleepimport RPi.GPIO as GPIOimport os
GPIO.setmode(GPIO.BOARD)
GPIO.setup(8, GPIO.IN)GPIO.setup(10, GPIO.IN)GPIO.setup(12, GPIO.IN)GPIO.setup(16, GPIO.IN)GPIO.setup(18, GPIO.IN)GPIO.setup(22, GPIO.IN)GPIO.setup(24, GPIO.IN)GPIO.setup(26, GPIO.IN)…… (cont)
![Page 12: Raspberry Pi dan Alat Parkir UI](https://reader035.fdokumen.com/reader035/viewer/2022081715/54034bf98d7f72de4c8b45d4/html5/thumbnails/12.jpg)
Python Code (continue)while True:
print( "8 : " , GPIO.input(8)) print( "10 : " , GPIO.input(10)) print( "12 : " , GPIO.input(12)) print( "16 : " , GPIO.input(16)) print( "18 : " , GPIO.input(18)) print( "22 : " , GPIO.input(22)) print( "24 : " , GPIO.input(24)) print( "26 : " , GPIO.input(26)) print( "---------------------")
if GPIO.input(8) == False: os.system("/root/panggil.sh 3 10.39.66.105")
if GPIO.input(10) == False: os.system("/root/panggil.sh 4 10.39.66.106")
if GPIO.input(12) == False: os.system("/root/panggil.sh 6 10.39.66.104")
if GPIO.input(18) == False: os.system("/root/panggil.sh 2 10.39.66.102")
if GPIO.input(22) == False: os.system("/root/panggil.sh 1 10.39.66.101")
sleep(0.2);
![Page 13: Raspberry Pi dan Alat Parkir UI](https://reader035.fdokumen.com/reader035/viewer/2022081715/54034bf98d7f72de4c8b45d4/html5/thumbnails/13.jpg)
panggil.shpanggil.sh------------------------------------------------#!/bin/bash/root/ngefoto.sh $1 $2 & > /dev/null
![Page 14: Raspberry Pi dan Alat Parkir UI](https://reader035.fdokumen.com/reader035/viewer/2022081715/54034bf98d7f72de4c8b45d4/html5/thumbnails/14.jpg)
ngefoto.shngefoto.sh------------------------------------------------#!/bin/bashsleep 2TIME=`date`HARITGL=`date "+%Y-%m-%d"`JAMMENIT=`date "+%H:%M"`BASE="/run/foto/$HARITGL/$JAMMENIT/$1"FILE=`date "+%Y-%m-%d %H:%M:%S.%N"`mkdir -p "$BASE"curl "http://admin:@$2/image/jpeg.cgi" > "$BASE/$FILE.jpg.tmp"mv "$BASE/$FILE.jpg.tmp" "$BASE/$FILE.jpg"
![Page 15: Raspberry Pi dan Alat Parkir UI](https://reader035.fdokumen.com/reader035/viewer/2022081715/54034bf98d7f72de4c8b45d4/html5/thumbnails/15.jpg)
Akses Capture Foto
http://10.39.66.2/
![Page 16: Raspberry Pi dan Alat Parkir UI](https://reader035.fdokumen.com/reader035/viewer/2022081715/54034bf98d7f72de4c8b45d4/html5/thumbnails/16.jpg)
Saving CostBeli dari Vendor● Loop Sensor Rp. 1 jt● Bircher Rp. 2,25 jt● Main Board Rp. 5,5 jt
Seluruhnya dikali 6Total Rp. 52,5 jt
Beli dari Vendor1. Loop Sensor Rp. 1 jt2. Bircher Rp. 2,25 jt3. Raspberry Pi Rp. 0.5 jt
Poin 1 & 2 dikali 6 + poin 3Total Rp. 20jt
![Page 17: Raspberry Pi dan Alat Parkir UI](https://reader035.fdokumen.com/reader035/viewer/2022081715/54034bf98d7f72de4c8b45d4/html5/thumbnails/17.jpg)
Next● Plate Recognition with Python● Gate Controller● UI Cash Transaction (Integration with BNI Tap Cash)
![Page 18: Raspberry Pi dan Alat Parkir UI](https://reader035.fdokumen.com/reader035/viewer/2022081715/54034bf98d7f72de4c8b45d4/html5/thumbnails/18.jpg)
Q & A