Cov txheej txheem:
- Kauj Ruam 1: Cov Ntaub Ntawv thiab Cov Cuab Yeej
- Kauj Ruam 2: Hloov Lub Log thiab Npaj Tsheb
- Kauj Ruam 3: Txiav thiab Vuam Tsav Mount
- Kauj Ruam 4: Txhim Kho Cov Tsav Tsheb thiab Siv
- Kauj Ruam 5: Cov Kab Xaim
- Kauj Ruam 6: Sib Txuas BMS
- Kauj Ruam 7: On/off Switch (loop Key)
- Kauj Ruam 8: VESC, Qhov Taw Qhia Roj Teeb thiab UBEC Connecor
- Kauj Ruam 9: Lub Cev Tsav Tsheb mus rau Vesc
- Kauj Ruam 10: Lub Hwj Huam Muab Raspberry Pi
- Kauj Ruam 11: Txuas tus Pi, Teeb thiab GPS
- Kauj Ruam 12: Vaj Tsev
- Kauj Ruam 13: Pib Teeb Pi
- Kauj Ruam 14: Muab Txoj Haujlwm ntawm Koj Tus Pi
- Kauj Ruam 15: Teeb Kiosk Hom Raspberry Pi
- Kauj Ruam 16: Nws Ua Haujlwm Li Cas
Video: Trackable Electric Longboard: 16 Cov Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Txoj haujlwm no suav nrog hluav taws xob ntev uas khaws txoj hauv kev nrog kev pab ntawm raspberry pi. Cov kev sib tham no tau khaws cia hauv mySQL database thiab tau nthuav tawm ntawm kuv lub vev xaib uas tau ua nrog lub tshuab microframework 'Flask'.
(Nov yog tsev kawm ntawv txoj haujlwm uas tau ua hauv 3 lub lis piam)
Kauj Ruam 1: Cov Ntaub Ntawv thiab Cov Cuab Yeej
Txoj haujlwm no xav tau kev txawj ntse thiab nws yuav raug nqi ib puag ncig € 500.
Cov ntaub ntawv:
Txhua cov ntaub ntawv thiab txuas rau cov neeg xa khoom muaj nyob hauv Daim Ntawv Nqi Khoom.
Cov Cuab Yeej:
- Soldering hlau + tin
- Pliers
- Kub kua nplaum phom
- Screwdrivers thiab allen key set
- Ib lub pincet tuaj yeem ua ke qee zaum
- Hlau cutter/stripper
Lub tshuab dhos, tshuab txiav laser thiab tshuab luam ntawv 3D tau siv hauv txoj haujlwm no!
Kauj Ruam 2: Hloov Lub Log thiab Npaj Tsheb
Ua ntej tshaj plaws, Kuv nqa cov log dawb me me tawm ntawm kuv daim ntawv ntev. Tom qab ntawd kuv tshem lub pob tawm thiab muab tso rau hauv lub log 90mm txiv kab ntxwv.
Lub tsheb thauj khoom uas lub cav yuav raug teeb tsa xav tau kev hloov me me. Lub log nrog lub log log tsis haum rau ntawm lub tsheb thauj khoom ntev uas kuv tau yuav, yog li kuv yuav tsum txiav li 1 cm nrog lub tshuab dhos.
thiab muab lawv tso rau ntawm cov tsheb thauj khoom, tshwj tsis yog lub log nrog lub iav (Kuv tau xaiv txoj cai, sab nraub qaum).
Kauj Ruam 3: Txiav thiab Vuam Tsav Mount
Kuv tau ua lub txhuas lub cev muaj zog txuas nrog lub lasercutter ntawm qhov ntev los ntawm daim duab saum toj no.
Qhov chaw ntawm lub roob yog qhov tseem ceeb. Nws yuav tsum tau muab kaum kom ntau li ntau tau yam tsis tau kov lub rooj tsavxwm thiab txij li thaum kuv muaj lub cev muaj zog loj, lub kaum sab xis tsis loj li. Kuv tshwm sim los paub tus kws txuas yog li thaum xub thawj nws tau txhuam nws me ntsis thiab tom qab ntawd sim ntsuas qhov chaw, Kuv thawb lub tsheb thauj khoom ntawm ib sab mus rau sab kom pom tias nws tau kov lub rooj tsavxwm.
Tom qab tag nrho kuv lub rooj tsavxwm tiav, kuv tau sim caij tsheb thiab lub cav sib tsoo tawg xoob xwv kom piav qhia tias vim li cas kuv lub cav yuav saib tsis zoo hauv daim duab tom ntej;)
Kauj Ruam 4: Txhim Kho Cov Tsav Tsheb thiab Siv
Siv 4 ntawm M4*14 siab tawv txhawm rau txhim kho lub cav kom nce.
Tom qab ntawd koj yuav tsum ua kom nrawm 12 hniav lub cev muaj zog rub ntawm lub cev muaj zog. Nco ntsoov tias qhov loj me yog nyob ntawm qhov tiaj ntawm tus ncej!
Tam sim no koj tuaj yeem nqa ib txoj hlua thiab muab tso rau ib ncig ntawm lub log, nqa lub log nrog lub iav thiab tig nws ib ncig kom txog thaum tag nrho txoj siv nyob ib puag ncig lub iav.
Ceev cov txiv ntoo rau lub tsheb kom koj lub log tsis poob thiab qhov ntawd yog nws.
Kauj Ruam 5: Cov Kab Xaim
Cov khoom siv hluav taws xob tau txuas nrog raws li daim duab saum toj no.
Thawj qhov yog ua tiav cov txheej txheem ntawm te hluav taws xob.
Daim duab thib ob qhia tag nrho cov kev sib txuas ntawm cov khoom siv hluav taws xob ntev, 6s UBEC rau 12V mus rau daim duab tom ntej. Daim duab ntawd qhia txog kev sib txuas ntawm lub teeb thiab cov ntsuas uas tau tswj los ntawm raspberry Pi.
Raws li koj tau pom dhau los lawm, tft screen muaj tus poj niam lub taub hau uas siv ntau tus pin. Pins uas peb xav tau rau kev sib txuas lus txuas nrog GPS module. Yog li kuv tau xaim cov xov hlau ntawm tus pin peb xav tau (Daim duab 4-6) rau tus poj niam lub taub hau uas ntsaws rau hauv Pi.
Kauj Ruam 6: Sib Txuas BMS
Kuv siv comsa42 nws cov lus piav qhia rau daim duab txuas.
Kuv siv BMS (kev tswj roj teeb) Tshuav nyiaj txiag kom them kuv lipo yog li kuv tuaj yeem tso lawv mus rau hauv kuv lub tsev thiab them lawv nrog 'ntse them nyiaj' ntawm lub DC dej tsis muaj dej
Kuv tau siv ob txoj hlua txuas rau them chaw nres nkoj ntawm BMS, Ib qho ntawm P- (dub) thiab lwm qhov ntawm P+ (liab). chaw nres nkoj them nqi)
NCO TSEG: Thaum pib kuv siv DC jack nrog cov ntsia hlau, tab sis kuv tau hloov nws nrog DC dej tsis muaj dej los ntawm BOM tom qab. Tsis txhob txhuam lub ntsaws lossis koj yuav muaj teeb meem ib zaug koj xav muab tso rau hauv koj lub tsev.
Kuv txuas ob lub roj teeb ua ke nrog ib qho ntawm 'XT60 2 pob hauv kab ntsaws' Kuv yuav. Kuv tau ntsaws tus txiv neej lub taub hau rau hauv tus poj niam thiab kuv tau siv cov xim liab thiab xim dub tuab rau nws. Cov hlau liab mus rau B+ ib qho BMS thiab cov dub txuas mus rau B-.
Tom qab ntawd cov kab hluav taws xob sib npaug rau cov roj teeb. Kuv tau siv ob qho ntawm cov khoom siv sib npaug thiab tsis txuas lub xov tooj liab liab rau lub roj teeb ib zaug thiab xaim dub kawg rau roj teeb ob ntawm ob sab. Peb tsis xav tau cov ntawd vim tias cov no zoo ib yam li cov xov tooj roj teeb tuab, uas peb twb txuas nrog lawm. Tom qab ntawd muab nws tso rau hauv txoj cai kom zoo li daim duab.
NCO TSEG: Hauv nruab nrab kuv txuas hauv av nrog qhov zoo los ntawm lub roj teeb tom ntej, tab sis qhov ntawd tsis tsim nyog tiag tiag, vim tias cov khoom sib txuas twb tau ua qhov ntawd lawm.
Kauj Ruam 7: On/off Switch (loop Key)
Hloov chaw ntawm yuav 60 daus las tiv thaiv lub txim taws, kuv tau ua lub voj tseem ceeb. Lub hauv paus yog yooj yim. Koj ua rau muaj kev cuam tshuam hauv Circuit Court thiab tig lub Rooj Tswjhwm Saib, ntsaws rau hauv XT90 tiv thaiv lub qhov hluav taws xob txuas thiab lub Circuit Court raug kaw, yam tsis muaj lub txim taws.
Ua ntej kuv tau xaim ib lub xaim rau tus txiv neej ntsaws (daim duab 2-4) thiab tom qab ntawd qee qhov 3.5mm lub pob txuas rau tus poj niam XT90 ntsaws.
Txhawm rau txuas nws rau lub roj teeb, Kuv siv tus txiv neej XT60 txuas rau tus poj niam XT60 txuas tab sis nrog kev cuam tshuam hauv cov hlau liab. Tom qab ntawd kuv tau siv cov mos txwv txuas rau qhov kawg uas kuv txiav cov hlau nyob hauv ib nrab, yog li kuv tuaj yeem ntsaws tus poj niam XT90 lub taub hau tsis txhob siv nws ncaj qha mus rau kab. Yog li ntsaws nws thiab voila, qhov qhib/tua hloov tau ua tiav.
Kauj Ruam 8: VESC, Qhov Taw Qhia Roj Teeb thiab UBEC Connecor
Kuv ua kuv tus kheej '3 nyob rau hauv ib qho txuas rau 1 txuas' los ntawm 3 XT60 lub taub hau ua ke (daim duab 1) thiab txuas cov xaim rau tsob ntoo zoo thiab xaim rau tsob ntoo tsis zoo (daim duab 2-6). Tom ntej no kuv tau siv tus txiv neej txuas rau nws thiab tiv thaiv cov kab liab qab nrog qee cov kab xev dub. (duab 7-9)
VESC & Qhov Ntsuas
Siv tus txiv neej XT60 ntsaws rau VESC cov hlua hluav taws xob thiab txuas rau cov xov tooj ntawm cov roj teeb feem pua/qhov ntsuas hluav taws xob.
UBEC
Unplug2 tshuav cov kab hluav taws xob thiab txuas ntawm tus txiv neej kawg rau tus txiv neej XT60 ntsaws. Tus poj niam xaus txuas rau sab nkag ntawm uBEC (hloov hluav taws xob).
NCO TSEG: Kuv tau txiav cov xov tooj sib npaug me ntsis 'luv dua, tab sis qhov ntawd yog qhov ua yuam kev yog li cia lawv nyob twj ywm;)
Kauj Ruam 9: Lub Cev Tsav Tsheb mus rau Vesc
Siv ob ntawm cov kab hluav taws xob txuas mus txuas lub ntsuas cua ntawm lub cev rau VESC. Lub cev muaj 5 tus pin, 2 rau lub zog rau tsob ntoo rau lub tsev ntsuas (1 tus pin rau ib lub tsev sensor).
Rub tawm plaub txoj hlua tawm ntawm 4pin sab thiab nqa ib txoj hlua ntxiv los ntawm ob txoj kab txuas ntxiv, txiav lawv luv dua thiab muab qee tus txiv neej txuas rau qhov kawg. Muab lawv tso rau hauv qhov raug raws li hauv daim duab
Siv cov raj cua sov thiab cov kab xev ua kom txhua yam ruaj ntseg! Thaum qhov ntawd ua tiav, tsuas yog ib qho uas yuav tsum tau ua yog tsuas yog muab lawv tso rau hauv txoj cai los ntawm VESC mus rau lub cav.
Kauj Ruam 10: Lub Hwj Huam Muab Raspberry Pi
Peb xav tau 12V rau 5V hloov pauv uas yuav ua rau lub zog raspberry pi ntawm USB, yog li kuv tam sim xav txog lub tsheb them nyiaj. Nws yog qhov pheej yig thiab cov tswv yim daws teeb meem.
NCO TSEG: Ua ntej peb qhib nws, koj yuav tsum nco ntsoov tias koj nco qab qhov twg yog qhov chaw nres nkoj uas tuaj yeem xa 2.1 Amps, vim tias Pi xav tau nws.
Yog li tshem daim ntawv nplaum thiab tshem tawm sab saum toj ntawm lub tsheb them nyiaj, tom qab ntawd xoob tus pin rau hauv qab. Tom qab ntawd nws yuav qhib tau yooj yim, ua kom lub caij nplooj ntoo hlav tawg (+12V) thiab cov khoom nkhaus hlau (GND) xoob thiab hloov lawv nrog 2 ntawm cov xov tooj sib npaug (muab tus txiv neej sab rau PCB).
Thaum qhov ntawd ua tiav, Kuv tau tshuaj xyuas yog tias txhua yam yog qhov raug los ntawm kev txuas lub DC nkaus rau cov xov hlau thiab txuas nws mus rau hauv lub zog hluav taws xob ntawm kuv cov LED teeb thiab ntsuas USB tso zis hluav taws xob (Ob sab sab nraud yog +5V thiab GND).
Yog tias txhua yam raug, koj tuaj yeem zais cov hlau uas tsis muaj dab tsi nrog qee cov cua sov ntsws thiab cov kab xev.
NCO TSEG: Dubbelcheck polarity ntawm lub charger, vim tias nws tuaj yeem sib txawv.
Kauj Ruam 11: Txuas tus Pi, Teeb thiab GPS
Tam sim no lub zog rau cov teeb.
Peb tau txais 12V los ntawm peb lub uBEC thiab peb xav tau qhov ntawd rau peb lub teeb pem hauv ntej, lub teeb tom qab thiab lub tsheb them nyiaj. Raspberry pi tsis tuaj yeem xa hluav taws xob txaus tam sim no lossis qhov hluav taws xob los pub LEDs yog li peb yuav tau siv lub transistor. Lub 12V yuav siv los ua lub zog siv thiab raspberry pi yuav hloov lawv rau thiab tawm los ntawm kev tswj lub hauv paus ntawm NPN transistor (2N222: pic 2) yog li ntawd cia peb muab qhov ntawd txuas rau lub rooj tsav xwm qauv.
Ua ntej tshaj tag nrho cov teeb pom kev zoo li lub nraub qaum ntawm daim ntawv ntev thiab lub raspberry pi yuav los rau pem hauv ntej yog li cov hlua yuav tsum tau txuas ntxiv (daim duab 3-5). Tail teeb muaj 3 xov hlau. Dub (tsis zoo), daj (khiav/Tsov Lub Teeb), liab (nres/nres Teeb). Tab sis vim tias tsuas muaj qhov sib txawv me me ntawm tus nres thiab lub teeb khiav, kuv xaiv siv cov hlau liab thiab tso tus daj ib leeg. Muab tus txiv neej ntev xaim rau hauv cov hlau uas muab tom qab lub teeb thiab khoov nws ua ke kom txog thaum xaim tsis tuaj yeem xoob dua. Ua qhov no rau cov xaim dub thiab liab.
Rau lub teeb tom qab, muab lawv sib dhos ua ke. Tom qab ntawd lub rooj tsav xwm tsim qauv. Solder tus poj niam xaus ntawm ob qhov sib npaug ntawm cov xov hlau rau pawg thawj coj saib siv tooj liab hlau txhawm rau txhawm rau 12V hla tag nrho pawg thawj coj saib. Tom qab ntawd ntxiv cov transistors, ib qho rau lub teeb pem hauv ntej thiab ib qho rau lub teeb tom qab. Collector -> 12V, emitter -> GND en lub hauv paus rau tus tiv thaiv thiab tom qab ntawd mus rau xaim nrog tus poj niam kawg, uas yuav haum rau ntawm raspberry pi GPIO pins (tus pin 20 & 21). Lub tsheb them lub tsheb tuaj yeem siv hluav taws xob los ntawm 12V, tom qab ntawd muab lub xov tooj usb txuas rau hauv USB kom raug thiab tso lub micro usb kawg rau hauv raspberry pi.
Kev sib txuas GPS:
PIB GPS
3.3V -> Vin
GND -> GND
RX -> TX
TX -> RX
NCO TSEG: Tsuas yog 2 lub hauv paus pins los ntawm transistor xav tau sab nraud tiv thaiv kom txwv qhov tam sim no. Lub teeb tsis xav tau cov ntawd vim tias lawv tau tsim rau hauv cov coj.
Kauj Ruam 12: Vaj Tsev
Kuv qhwv cov ntu uas koom ua ke hauv cov yas yas kom ntseeg tau tias txhua lub xov hlau tau nyab xeeb thiab nws yooj yim dua tso rau hauv kuv lub tsev. Kuv tsim txhua ntu hauv tus neeg tsim khoom thiab luam tawm nrog kuv lub tshuab luam ntawv 3d. Txhua tus neeg tsim khoom (.ipt) cov ntaub ntawv thiab tshuab luam ntawv/ntawv txiav cov ntawv (.stl) tau muab. Cov qauv tsim yog qhov yooj yim heev.
Sab nraub qaum (cov khoom siv hluav taws xob ntev ntev)
Koj tuaj yeem tso lub ntsuas roj teeb rau hauv thiab tus poj niam XT90 ntsaws thiab tom qab ntawd tso lub thawv yas. Thaum lub tsev raug kaw, Kuv kho XT90 ntsaws nrog cov kua nplaum kub kom nws nyob qis qis thaum hloov pauv rub tawm thiab tawm. Kuv kuj tau ntxiv cov ntsia hlau nyob sab hauv ntawm lub tsev nyob ib sab ntawm phab ntsa uas XT90 ntsaws tau txuas kom lub phab ntsa tsis tuaj yeem nias thaum ntsaws rau hauv lub voj.
Tus kav hlau txais xov los ntawm gps module yog ntev, ntev heev. Yog li kuv khaws ob qhov kawg tawm ntawm lub thawv thiab khawm cov hlau rau hauv ntu ntawm rooj plaub no.
NCO TSEG: Siv cov ntsia hlau me me uas tsis ntev dua tom qab ntawv ntev yog tuab!
Ib zaug uas yog qhov zoo, Kuv hloov kuv qhov kev sim DC jack nrog qhov tsis muaj dej. Kuv tau siv qee cov xov hlau nrog cov poj niam sib txuas cov mos txwv rau cov xov hlau thiab cov txiv neej txuas cov mos txwv ntawm cov xov hlau uas txuas rau BMS pawg thawj coj. Ib qho ntxiv, cov xov hlau tsis tas yuav tsum tuab vim tias lub charger tsuas xa ib ncig 2 amps. Nws kuj tseem yuav yooj yim rau ntsaws lub jack hauv rooj plaub nrog qee cov xov hlau me …
Pem hauv ntej (raspberry pi nrog GPS thiab teeb)
Xaub qhov screen rau sab nraum qab ntawm rooj plaub. Muab cov kab xev tso rau hauv lub tsev thiab ntsia nws. Koj kuj tseem yuav xav muab qee cov ntawv ci lossis qee yam nruab nrab ntawm tus kav hlau txais xov thiab raspberry Pi, vim tias nws tau sib nqus heev thiab cov khoos phis tawj tsis zoo ib yam li ntawd.
NCO TSEG: Ceev faj thaum koj xaub lub tft screen mus rau hauv lub tsev, yog li koj tsis ua puas rau cov xov hlau uas tswj kev kov. Nws tshwm sim rau kuv…
Kauj Ruam 13: Pib Teeb Pi
Ua ntej tshaj plaws, peb xav tau daim npav SD nrog Raspbian. Koj tuaj yeem rub tawm raspbian los ntawm no. Thaum uas tau rub tawm, peb tuaj yeem nruab raspbian ntawm SD daim npav. Koj tuaj yeem teeb tsa software siv Win32Discmanager lossis lwm yam hauv koj lub computer.
Thaum nws tau teeb tsa koj yuav tsum ntxiv cov ntaub ntawv hu ua 'ssh' yam tsis txuas ntxiv los pab kom SSH ntawm pi. Thaum ua tiav lawm, koj tuaj yeem khau raj koj cov raspberry thiab ntxiv rau koj lub network.
Tus pi yuav tsis muaj kev sib txuas rau koj lub network yog li koj yuav tsum teeb tsa APIPA chaw nyob, qhov no yog IP chaw nyob uas tus pi yuav muaj thaum nws tsis muaj kev sib txuas rau lub network. Qhib cov ntawv 'cmdline.txt' ntawm daim npav SD thiab ntxiv APIPI chaw nyob. Piv txwv li: 'ip = 169.254.10.5'.
NCO TSEG: Xyuas kom txhua yam sawv ntawm ib kab lossis nws yuav tsis ua haujlwm!
Muab daim SD tso rau hauv PI, ntxiv ib lub network cable los ntawm koj tus pi rau koj lub computer thiab tom qab ntawd ntsaws rau hauv lub hwj chim.
Tom qab ntawd koj tuaj yeem siv Putty lossis yog tias koj siv mac, tsuas yog siv lub davhlau ya nyob twg los tsim kev sib txuas SSH.
Ntxiv kev sib txuas wireless:
Txhawm rau ntxiv lub network tshiab rau koj pi koj tuaj yeem ntaus cov lus txib no:
ncha ENTER_ YOUR_PASSWORD | wpa_passphrase ENTER_YOUR_SSID >>
/etc/wpa_supplicant/wpa_supplicant.conf
Tom qab rov pib dua koj yuav tsum tuaj yeem pom koj tus IP chaw nyob ntawm koj lub router thiab txuas rau koj tus pi ntawm ssh nrog tus IP ntawd.
ssh pi@IP_FROM_PI
Ib txwm nrhiav koj tus ip yog qhov txaus siab me ntsis yog li cia peb teeb lub npe hostname yog li peb tuaj yeem siv qhov ntawd (kev teeb tsa bonjour xav tau ntawm cua tshuab PC rau qhov no).
sudo raspi-config nonint do_hostname CHOOSE_A_HOSTNAME
NCO TSEG: Txhawm rau siv lub npe host yav tom ntej koj yuav tsum ntaus SSH txoj cai zoo li no:
ssh USER@YOUR_HOSTNAME.local
Peb yuav tsum paub tseeb tias pi lub kaw lus thiab pob khoom tau hloov kho tshiab:
Nkag mus rau cov lus txib hauv qab no kom paub tias:
sudo apt-tau hloov tshiab & sudo apt-tau hloov tshiab
Kauj Ruam 14: Muab Txoj Haujlwm ntawm Koj Tus Pi
Tus neeg siv tshiab
Kuv tsim tus neeg siv tshiab 'longboard' rau txoj haujlwm no:
Peb yuav tsum tau mus rau lub hauv paus rau qhov no
sudo -i
Adduser longboard Tus password tshiab:> l0ngb0@rd Lub npe tag nrho:> hluav taws xob longboard
Koj tuaj yeem tso qhov seem tseg. Raws li tom ntej no peb yuav xav muab tus neeg siv 'longboard' txoj cai ntawm sudo
adduser longboard sudo
Tom qab ntawd peb yuav rov qab mus rau peb cov neeg siv khoom siv ntev
nyob longboard
Pob
Txhim kho qee pob khoom rau txoj haujlwm. Cov pob khoom rau hosting lub vev xaib cov ntaub ntawv
python3 -m pip nruab --user -hloov kho pip == 9.0.3
sudo apt install -y python3-mysqldb mysql-server uwsgi nginx uwsgi-plugin-python3 rabbitmq-server
Cov ntaub ntawv txuas, cov vev xaib cov vev xaib hauv tsev qiv ntawv hauv GPS/tijdzone detectie
python -m pip nruab mysql-connector-python argon2-cffi Flask Flask-HTTPAuth Flask-MySQL mysql-connector-python passlib argon2 libgeos-dev pytz tzwhere
Teeb database
Txheeb xyuas qhov xwm txheej ntawm mysql
sudo systemctl xwm txheej mysql
Los ntawm kev nkag mus rau cov lus txib no, koj tuaj yeem pom tias MySQL tsuas yog mloog ntawm 127.0.0.1 -> nkag tsis tau los ntawm lub network, tsuas yog hauv zos (ntawm pi tus kheej).
ss -lt | pib mysql
Pib tus neeg siv khoom raws li roo
sudo mysql
Tsim cov neeg siv:
Tsim tus neeg siv 'project-admin'@'localhost' IDENTIFIED BY '@min_l0ngb0@rd';
Tsim tus neeg siv 'project-longboard'@'localhost' IDENTIFIED BY 'l0ngb0@rd';
Tsim database thiab teeb tsa cov cai:
Tsim DATABASE longboard_db;
ZOO TSHAJ PLAWS YOOJ YIM RAU longboard_db.* Rau 'project-admin'@'localhost' NROG QHOV ZOO TSHAJ PLAWS; > GRANT SELECT, INSERT, Hloov tshiab, Rho tawm ntawm longboard_db.* TO 'project-longboard'@'localhost'; > KEV NYUAJ SIAB;
Khiav cov ntawv sql los tsim cov ntxhuav, nws tseem yuav tsim tus neeg siv tsis raug rau lub vev xaib:
(username: longboard, password: xeem):
qhov chaw hauv tsev / logboard / longboard / longboard_db.sql;
tawm
Kuaj yog tias khiav cov ntaub ntawv ua haujlwm:
ncha 'qhia cov ntxhuav;' | mysql longboard_db -t -u project -admin -p
Tsim cov npe 'longboard' thiab clone kuv qhov project los ntawm github
mkdir longboard && cd longboard
git clone
Yog tias koj siv tib lub npe npe thiab tus neeg siv zoo li kuv, tom qab ntawd koj yuav tsum tsis hloov kho cov ntaub ntawv hauv kab ntawv conf.
Yog tias koj tsis yog koj yuav tsum kho cov ntaub ntawv (> sudo nano conf/filename.extension)
Thaum txoj hauv kev raug lawm, koj yuav tsum luam cov ntawv mus rau qhov system directory. Muaj cov kev pabcuam ntoo.
- Ib qho rau kiosk qhov chaw ntawm lub zos.
- Ib qho rau gps module nrog cov ntaub ntawv sib txuas
- Ib qho rau lub xaib muaj nyob ntawm koj lub network
sudo cp conf/project1-*. service/etc/systemd/system/
sudo systemctl daemon-reload> sudo systemctl pib project1-*> sudo systemctl xwm txheej project1-*
Thaum txhua yam tsis ua li cas, koj yuav tsum pab kom lawv thiaj li yuav pib txiav thaum lub khau pi:
(Yog tias cov kauj ruam dhau los tsis ua tiav, tom qab ntawd koj yuav tsum txheeb xyuas txoj hauv kev hauv cov ntaub ntawv teeb tsa)
sudo systemctl pab kom qhov project1-*
Kho qhov kev pabcuam nginx:
- luam conf/nginx rau 'chaw-muaj' (thiab muab nws lub npe zoo dua)
- tshem qhov txuas mus rau qhov default-config
- txuas rau tus tshiab config/nginx
- pib dua kom qhib qhov kev hloov pauv
sudo cp conf/nginx/etc/nginx/sites-available/project1
sudo rm/etc/nginx/sites-enabled/default> sudo ln -s/etc/nginx/sites-available/project1/etc/nginx/sites-enabled/project1> sudo systemctl rov pib dua nginx.service
Txheeb xyuas yog tias nginx muaj txoj sia nyob:
sudo systemctl xwm txheej nginx.service
Thaum ua tiav koj yuav tsum muaj lub vev xaib ntawm tus ip ntawm koj tus pi muaj nyob hauv koj lub network thiab lub xaib ntawm lub localhost kom pib thiab nres kev sib tham offline.
Kauj Ruam 15: Teeb Kiosk Hom Raspberry Pi
Txhim kho pob khoom
sudo apt-tau nruab chromium-browser x11-xserver-utils unclutter
Nkag mus rau autostart cov ntaub ntawv ntawm tus neeg siv pi:
sudo nano/etc/xdg/lxsession/LXDE-pi/autostart
Koj yuav tsum tau tawm tswv yim (muab tus # nyob rau pem hauv ntej ntawm kab) txoj cai uas twb muaj lawm:
#@xscreensaver -tsis -txaws
Tom ntej no ntxiv cov kab hauv qab kab kab ntxaij lim dej
@xset tawm
@xset -dpms @xset s noblank @chromium-browser --noerrdialogs --kiosk https://127.0.0.1:8080/ --overscroll-history-navigation = 0 --incognito --disable-pinch
Ntaus ctrl-O thiab tom qab ntawd ctrl-X sau thiab tawm cov ntaub ntawv thiab tam sim no ntaus:
sudo raspi-teeb tsa
Los ntawm qhov ntawd nqes mus rau boot_behaviour thiab hloov qhov teeb tsa no rau khau raj hauv hom duab thiab nkag mus raws li tus neeg siv pi los ntawm lub neej ntawd.
NCO TSEG: kom tawm ntawm hom kiosk, koj tuaj yeem ntaus hauv
sudo killall chromium-browser.
Qhov no yuav kaw txhua qhov xwm txheej chromium browser.
Kauj Ruam 16: Nws Ua Haujlwm Li Cas
Thaum pi khau raj, koj yuav pom tus IP chaw nyob ntawm tft screen ua ke nrog cov npe ntawm txhua tus neeg siv ntawm pawg thawj coj.
Koj tuaj yeem pib sib tham offline ntawm lub vijtsam no. Koj tseem tuaj yeem tswj koj lub teeb. Yog tias koj ntaus tus IP chaw nyob hauv koj tus browser, koj yuav los ntawm lub vijtsam nkag mus. Koj tuaj yeem nkag mus nrog tus neeg siv qub 'board' (password: sim). lossis koj tuaj yeem tsim tus as khauj tshiab. Ib qho uas ua tiav, koj yuav pom koj lub dashboard. Ntawm no koj tuaj yeem pom koj txoj kev taug kev thiab tag nrho nrug, sijhawm mus ncig. Yog tias koj mus rau lub tab longboard, koj tuaj yeem pom qhov chaw tam sim no ntawm pawg thawj coj saib, koj tuaj yeem hloov koj lub teeb thiab koj tuaj yeem pib kaw qhov kev sib tham. Thaum koj nyem ntawm 'pib ntu' PI yuav txiav txim siab qhov chaw tas li thiab khaws nws hauv cov ntaub ntawv khaws cia kom txog thaum koj nias 'nres ntu'. Yog tias GPS tsis muaj kev kho, tsis tuaj yeem pib sib tham, koj yuav tau txais kev ceeb toom nyob rau sab saum toj ntawm lub vijtsam. Koj qhov kev sib tham yuav tshwm rau ntawm google daim duab qhia chaw.
Runner Up hauv Kev Ua Kom Nws Sib Tw
Pom zoo:
DIY Electric Longboard !: 7 Kauj Ruam (nrog Duab)
DIY Hluav Taws Xob Hluav Taws Xob!: Nyob zoo, Cov kws tsim tawm sab nrauv, hauv phau ntawv qhia no kuv yuav qhia koj yuav ua li cas thiaj ua tau hluav taws xob skateboard DIY ntawm pob nyiaj siv me me. Lub rooj tsavxwm kuv tsim tau tuaj yeem ncav cuag nrawm txog 40km/hr (26mph) thiab khiav txog 18km. Saum toj no yog daim vis dis aus qhia thiab ob peb pi
Cov Duab Duab Duab thiab Cov Duab 1: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Cubes thiab Cov Duab 1: Thaum sim nrog qee cov ntoo ntoo thiab cov duab los qhia, kuv pom ob peb txoj hauv kev los ua cov voos thiab lwm yam duab los ntawm cov khoom siv yooj yim. Los ntawm kev muab cov no los ua Cov Ntawv Qhia, Kuv vam tias yuav txhawb nqa kev ua si thiab kev kawm. Kev hloov pauv ntawm qhov kev qhia no
Insane Electric Longboard Budet With Carbon Fiber Deck: 6 Cov Kauj Ruam (nrog Duab)
Insane Electric Longboard Budet With Carbon Fiber Deck: nyob zoo ua ntej kuv tham txog kuv tus kheej thiab yog vim li cas kuv thiaj txiav txim siab mus rau txoj kev taug no, Kuv yuav nyiam hais thov txheeb xyuas kuv daim vis dis aus rau kev caij tsheb kauj vab thiab kuv cov kev coj ua tseem ceeb thov sau npe rau nws yuav pab kuv chav kawm qib siab tiag tiag, vim tias
Cov Duab Duab Duab Duab, WiFi Txuas - Raspberry Pi: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Duab Duab, WiFi Txuas - Raspberry Pi: Nov yog txoj hauv kev yooj yim heev thiab tus nqi qis mus rau cov duab thav duab digital - nrog qhov zoo ntawm kev ntxiv /tshem cov duab hla WiFi ntawm 'nyem thiab luag' siv (pub dawb) xa cov ntaub ntawv . Nws tuaj yeem siv tau los ntawm qhov me me £ 4.50 Pi Zero. Koj tseem tuaj yeem hloov pauv
Rov Qab Siv Cov Duab Duab Nrog Virtual Asistent: 7 Cov Kauj Ruam (nrog Duab)
Rov Qab Siv Cov Duab Duab Nrog Virtual Asistent: Nyob zoo txhua tus! Cov lus qhia no tau yug los ntawm lub laptop faib ua ib nrab, yuav los ntawm ib tus phooj ywg. Thawj qhov kev sim ntawm txoj haujlwm no yog kuv Lego Digital Photo Frame, txawm li cas los xij, yog ib tus neeg mob siab rau Siri thiab Google Tam sim no, Kuv txiav txim siab coj nws mus rau qhov tshiab