Cov txheej txheem:

SmartBar Cocktails: 6 Kauj Ruam
SmartBar Cocktails: 6 Kauj Ruam

Video: SmartBar Cocktails: 6 Kauj Ruam

Video: SmartBar Cocktails: 6 Kauj Ruam
Video: SmartBar 2024, Kaum ib hlis
Anonim
SmartBar Cocktails Cov
SmartBar Cocktails Cov

Hauv cov lus qhia no kuv yuav pab koj ua tus smartbar. kuv tau ua qhov haujlwm no vim tias kuv nyiam haus dej haus cawv thiab kuv xav kom siv tus txheej txheem kom zoo.

Khoom siv:

Cov khoom siv xav tau rau txoj haujlwm no yog raws li hauv qab no:

Tsawg kawg

  • 1 Raspberry Pi
  • 1 SD daim npav (16GB)
  • ob peb jumper xov hlau
  • daim kab xev hluav taws xob
  • 2 sab nplaum daim kab xev

Sensors

  • 1 LCD zaub
  • 1 RFID sensor
  • 1 sib nqus sib nqus sensor
  • 2 thauj lub ntsej muag + HX711 nti

Actuators

  • 4 peristaltic twj (12V)
  • 14-channel tshaj tawm

Kuv cov ntaub ntawv tsev

  • OSB ntoo 12 hli
  • plexiglass
  • tooj liab raj (1m)

Kauj ruam 1: Teeb

Txhawm rau pib peb yuav tsum xub teeb tsa koj Pi.

Koj yuav xav tau ob yam:

  • win32 Disk imager
  • Raspbian OS duab

Kev teeb tsa

  1. Qhib win32 disk imager
  2. Xaiv koj cov duab ntawm Rasbian OS
  3. Xaiv koj daim npav SD
  4. Nyem rau sau

Ua ntej peb tuaj yeem pib coding peb yuav tsum teeb tsa ob peb yam ntawm pi.

  1. Mus rau khau raj phau ntawv teev npe ntawm SD daim npav
  2. Qhib cov ntaub ntawv "cmdline.txt"
  3. Ntxiv ip = 169.254.10.1 Thaum kawg ntawm kab ntawv ntev ntawm cov ntawv sib cais nrog qhov chaw
  4. Txuag cov ntawv.
  5. Tsim cov ntaub ntawv npe ssh uas tsis muaj kev txuas ntxiv hauv tib cov npe

Tam sim no koj tuaj yeem nyab xeeb tshem daim npav SD thiab pib pi nrog daim npav SD

Txuas mus rau pi

Koj tuaj yeem txuas nrog ntau txoj hauv kev rau pi, tab sis kuv nyiam siv comand sai.

  1. Qhib qhov hais kom ua
  2. Sau "ssh [email protected]"
  3. Nyem nkag
  4. Sau tus password "raspberry"

WiFi

Txhawm rau nkag mus rau koj lub xaib ntawm koj lub xov tooj koj yuav xav tau WiFi ip. ntawm no rau koj yuav tsum tau txuas rau WiFi.

  • sau "sudo wpa_passphrase" SSID "" PASSWORD ">> /etc/wpa_supplicant/wpa_supplicant.conf"
  • Nkag mus rau WPA tus neeg siv khoom

wpa_cli

Xaiv interface

wb wl0

Reload teeb tsa

rov tsim dua tshiab

Nab hab sej pob

  • Lub hwj
  • Flask-cors
  • Flask-MySQL
  • Flask-SocketIO
  • Gevent
  • Gevent-websocket

siv cov cai hauv qab no los teeb tsa pob khoom

"pip nruab Flask Flask-Cors Flask-MySQL Flask-SocketIO Gevent Gevent-websocket"

Kauj ruam 2: Database

Cov Database
Cov Database

Rau kuv cov ntaub ntawv kuv siv 7 cov ntxhuav

  • pompConfig
  • sensors
  • MesureSensors
  • cov neeg siv
  • xaj Cocktails
  • cocktails
  • tus account

Kauj Ruam 3: Kev thaiv kab hlau

Thaiv
Thaiv

Siv kuv lub tswv yim los xaim tag nrho txoj haujlwm ua ke.

Cov relay siv 5V tab sis tswj nrog 3.3V

LCD siv 5V

Kauj Ruam 4: Ua Kev Pabcuam Tawm Ntawm Koj Txoj Haujlwm

Txhawm rau kom ntseeg tau tias koj txoj haujlwm pib thaum koj pib koj li pi, koj yuav tsum ua kom koj cov cai siv. Koj ua qhov no ua raws.

"sudo systemctl pab kom myscript.service"

Kauj Ruam 5: Vaj Tsev

Vaj tse
Vaj tse
Vaj tse
Vaj tse

Rau qhov haujlwm no kuv tau siv OSB ntoo. Koj yuav xav tau cov phiaj xwm ntawm qhov loj me hauv qab no

  • 2 zaug 60 x 42 cm (pem hauv ntej thiab nraub qaum)
  • 2 zaug 15 x 42 cm (sab vaj huam sib luag)
  • 2 zaug 13 x 40 cm (sab hauv faib)
  • 2 zaug 10 x 7 cm (platform rau 2 fwj)
  • 1 lub sijhawm 23 x 10 cm (platform rau 2 fwj)

Txhawm rau txiav ntoo no thov ceev faj thiab thov kev pab yog xav tau

Tom qab sib sau ua ke kuv cov ntaub ntawv kuv drilled ob peb wholes rau kuv cov khoom.

  • LCD. (7 cm x 2.5 cm)
  • Khawm (lub voj voog ntawm 15mm)
  • Lub Raj Mis (40 cm x 25 cm)
  • RFID (4 cm x 3mm)

Tom qab qhov no tau pib tso rau hauv kuv qhov kev xaiv tsa.

Kauj ruam 6: Pib App

  1. plug in pib
  2. tos kom txog thaum qhov program ua haujlwm
  3. mus rau tus ip koj pom ntawm lub vijtsam LCD
  4. xaiv cov dej cawv
  5. scan koj li RFID
  6. Txaus siab rau cov dej haus uas tsim nyog

Pom zoo: