Cov txheej txheem:

Lub Sijhawm Cube - Arduino Lub Sijhawm Nrhiav Gadget: 6 Kauj Ruam
Lub Sijhawm Cube - Arduino Lub Sijhawm Nrhiav Gadget: 6 Kauj Ruam

Video: Lub Sijhawm Cube - Arduino Lub Sijhawm Nrhiav Gadget: 6 Kauj Ruam

Video: Lub Sijhawm Cube - Arduino Lub Sijhawm Nrhiav Gadget: 6 Kauj Ruam
Video: Computer Vision with Python! Resizing Images 2024, Kaum ib hlis
Anonim
Lub Sij Hawm Lub Vev Xaib - Arduino Lub Sijhawm Saib Xyuas Gadget
Lub Sij Hawm Lub Vev Xaib - Arduino Lub Sijhawm Saib Xyuas Gadget
Lub Sij Hawm Lub Vev Xaib - Arduino Lub Sijhawm Taug Xyuas Gadget
Lub Sij Hawm Lub Vev Xaib - Arduino Lub Sijhawm Taug Xyuas Gadget

Kuv xav qhia koj yooj yim tab sis muaj txiaj ntsig tiag tiag rau qhov project arduino txhawm rau taug qab cov xwm txheej sijhawm los ntawm kev tig qee lub voos xwmfab ntse. Tig nws mus rau "Ua Haujlwm"> "Kawm"> "Ua Haujlwm"> "So" sab thiab nws yuav suav lub sijhawm koj siv rau qhov haujlwm ntawd. Lub voos xwmfab lub sijhawm tau tsim raws Arduino Nano thiab ADXL345 tus ntsuas qhov ntsuas kom haum rau lub thawv me me uas koj tuaj yeem kos cov cim cim lossis npe. Thaum kawg ntawm hnub koj tuaj yeem tshawb xyuas cov txheeb cais. Kuv vam tias nws yuav txhawb kuv kom "Kawm" ntau dua.

Muaj ntau yam khoom zoo sib xws hauv khw xws li TimeFlip.io, Timeular.com, ZEI. Koj tseem tuaj yeem sim ua haujlwm zoo DIY los ntawm Adafruit https://learn.adafruit.com/time-tracking-cube. Txawm li cas los kuv xav kom koj ua kom yooj yim dua. Txhawm rau taug qab cov ntaub ntawv sijhawm koj tsis xav tau wifi lossis bluetooth internet txuas rau cov kev pabcuam huab. Lub Sijhawm Cube tau siv thiab txuas nrog PC los ntawm USB cable. Hauv computer koj yuav tsum khiav kuv daim ntawv thov java uas mloog cov lus xa xov los ntawm arduino thiab qhia tag nrho siv sijhawm.

Txhua qhov xav tau cov peev txheej thiab qee cov lus qhia tsis ntxaws koj tuaj yeem pom ntawm kuv qhov GitHub qhov haujlwm:

Khoom siv

1. Arduino Micro lossis Nano zoo li ntawd:

2. ADXL345 accelerometer:

3. Thawv / lub thawv yas thawv

4. USB cable

Kauj Ruam 1: Hlau Pawg Thawj Coj thiab Accelerometer

Hlau Board thiab Accelerometer
Hlau Board thiab Accelerometer

ADXL345 sensor yog 3-axis accelerometer uas tuaj yeem ntsuas lub zog ntawm kev nrawm thiab thaum twg zoo li qub koj tuaj yeem nyeem nws qhov kev taw qhia. Koj yuav tsum xaim Arduino Nano lossis Micro board thiab ADXL345 accelerometer zoo li ntawm daim duab.

Kuv yuav tsis piav qhia ntxaws li cas ADXL345 accelerometer ua haujlwm. Txhua yam ntaub ntawv xav tau Kuv pom hauv kab lus zoo heev hais txog kev sib txuas nrawm mus rau arduino thiab lub cajmeem:

Kauj Ruam 2: Flash Program rau Arduino Nano

Flash Program rau Arduino Nano
Flash Program rau Arduino Nano
Flash Program rau Arduino Nano
Flash Program rau Arduino Nano

Hauv theem no peb yuav tsum tso qhov program los ntawm Arduino studio rau arduino board. Arduino nano yuav tuaj yeem nyeem XYZ kev tswj hwm los ntawm lub nrawm thiab xa lawv mus rau qhov chaw nres nkoj hauv qee yam ntawm cov ntaub ntawv pob zoo li

Koj tuaj yeem rub tawm txhua qhov xav tau los ntawm kuv qhov project GitHub nplooj ntawv (raws li cov ntaub ntawv khaws tseg nkaus xwb):

1. Unpack rub tawm zip archive rau qee cov ntawv zoo li c: / program / tcube thiab qhib cov ntaub ntawv tcube / arduino / tcub / tcub.ino hauv Arduino studio.

2. Txuas arduino board rau PC siv USB cable.

3. Los ntawm Cov Cuab Yeej-> Pawg: xaiv "Arduino Nano" (lossis lwm lub rooj tsavxwm uas koj npaj yuav siv).

4. Yog tias koj siv qee tus suav suav clones ces koj yuav tsum xaiv los ntawm Cov Cuab Yeej-> Tus Txheej Txheem-> ATmega328P (Qub Loader)

5. Xaiv qhov chaw nres nkoj txuas los ntawm Cov Cuab Yeej-> Chaw Nres Nkoj -> COM3 (hauv kuv qhov xwm txheej)

6. Upload qhov program rau arduino

7. Txij lub sijhawm ntawd nws yuav xa cov ntaub ntawv tam sim ntawd mus rau USB chaw nres nkoj txuas.

8. Txhawm rau ntsuas yog tias txhua yam ua haujlwm tau zoo koj tuaj yeem qhib "Serial Monitor" hauv Arduino Studio. Koj yuav tsum pom cov pob ntawv uas tsim tawm txhua thib ob zoo li …… (uas txhais tau tias yog kev tswj hwm qhov tseeb ntawm qhov ntsuas qhov ntsuas).

Kauj Ruam 3: Nruab Java Runtime Environment los Khiav Cov Neeg Siv Khoom ntawm PC

Nruab Java Runtime Ib puag ncig kom Ua Ntawv Thov Cov Neeg Siv khoom hauv PC
Nruab Java Runtime Ib puag ncig kom Ua Ntawv Thov Cov Neeg Siv khoom hauv PC

Ua ntej peb txuas ntxiv koj yuav tsum paub tseeb tias koj muaj Java Runtime Environment (JRE) teeb tsa hauv koj lub computer.

Daim ntawv thov cov neeg siv khoom uas kuv tsim los kom tau txais cov lus los ntawm Arduino thiab suav sau txheeb cais tau sau ua lus Java. Thiab JRE xav kom khiav Java daim ntawv thov. Koj yuav tsum muaj tsawg kawg JRE8 teeb tsa. Kuv qhia koj kom rub x64 version rau Windows. Thov rub nws los ntawm Oracle site

Kauj Ruam 4: Txhim Kho Cov Neeg Thov Kev Pab txhawm rau Nyeem Ua Haujlwm Los Ntawm Arduino thiab Taug Kev Txheeb Ze

Txhim Kho Cov Ntawv Thov Kev Nyeem Ntawv Ua Haujlwm Los Ntawm Arduino thiab Taug Kev Txheeb Ze
Txhim Kho Cov Ntawv Thov Kev Nyeem Ntawv Ua Haujlwm Los Ntawm Arduino thiab Taug Kev Txheeb Ze
Txhim Kho Cov Ntawv Thov Kev Nyeem Ntawv Ua Haujlwm Los Ntawm Arduino thiab Taug Kev Txheeb Ze
Txhim Kho Cov Ntawv Thov Kev Nyeem Ntawv Ua Haujlwm Los Ntawm Arduino thiab Taug Kev Txheeb Ze

Tam sim no nws yog lub sijhawm los npaj thiab tshaj tawm daim ntawv thov cov neeg siv khoom ntawm koj lub PC, uas yuav txuas rau USB chaw nres nkoj kom mloog thiab taug qab lub sijhawm txheeb cais.

Yog tias koj paub nrog Java koj tuaj yeem rub tawm thiab sau cov peev txheej ntawm Time Cube java daim ntawv thov los ntawm kuv qhov haujlwm GitHub. Txawm li cas los xij hauv cov phiaj xwm tag nrho cov ntaub ntawv uas koj twb tau rub tawm lawm twb tau suav sau thiab npaj siv daim ntawv thov tcube.zip uas koj yuav tsum tau ntim rau qee cov ntawv (nws tuaj yeem yog c: / programs / tcube)

Yog tias koj khiav cov ntaub ntawv run.bat nws yuav tsum pib daim ntawv thov, uas tam sim yuav sim pib txuas rau qee qhov nquag siv COM chaw nres nkoj siv los ntawm Arduino board (Arduino txuas nrog USB tau lees paub los ntawm Windows ua qee qhov chaw nres nkoj COM virtual).

Yog tias txhua yam tau teeb tsa kom raug koj yuav tsum pom tam sim lub sijhawm suav raws li qee yam haujlwm. Thiab los ntawm kev tig lub voos xwmfab koj yuav tsum muaj peev xwm taug qab cov haujlwm sib txawv. Daim ntawv thov lub qhov rai qhia cov xwm txheej cav thiab koj tuaj yeem pom ib qho yuam kev txuas uas yuav tshwm sim.

Kauj Ruam 5: Accelerometer Calibration

Accelerometer Calibration
Accelerometer Calibration

Nws yuav tshwm sim uas koj yuav tsum ntsuas koj lub Cube Lub Sijhawm vim tias koj lub ntsuas ntsuas ntsuas tsis tau ncaj qha zoo ib yam li kuv. Tsuas yog qhib app.properties cov ntaub ntawv thiab hloov kho kab rau kev tswj hwm ntawm txhua lub voos xwmfab raws li qhov chaw nyob uas koj yuav pom hauv daim ntawv thov nkag qhov rai rau txhua lub voos xwmfab.

Lossis koj tuaj yeem sim nrog kev taw qhia thiab nrhiav txoj haujlwm nrawm nrawm kom zoo ib yam li kuv.

Kauj Ruam 6: Kev Ntsuam Xyuas Ntxiv

Kev Ntsuam Xyuas Ntxiv
Kev Ntsuam Xyuas Ntxiv

Kuv daim ntawv thov java yog qhov yooj yim zoo nkauj thiab tsuas yog qhia lub sijhawm siv rau txhua qhov haujlwm thaum nruab hnub. Yog tias koj xav kom muaj kev tshuaj xyuas ntau ntxiv koj tuaj yeem siv Microsoft Excel rau kev tshuaj xyuas ntxiv.

Daim ntawv thov ua lub sijhawm-log.csv cov ntawv hauv CSV hom, uas muaj txhua qhov xwm txheej xa los ntawm arduino. Txij li cov xwm txheej tau tsim tawm txhua ob koj tuaj yeem ua qhov kev txheeb xyuas hnub ntxaws hauv MS Excel los tsim cov kab kos zoo, kab duab thiab kev tshuaj xyuas ntxiv.

Hauv daim nplaub tshev uas koj tau rub tawm los ntawm kuv qhov GitHub txoj haujlwm koj tuaj yeem pom log_analytics.xlsx cov ntaub ntawv zoo uas tsim cov ntawv qhia ncuav qab zib siv cov ntaub ntawv los ntawm cov ntaub ntawv time-log.csv. Koj yuav tsum hloov kho daim ntawv qhia tus kheej los ntawm nias "Refresh All" khawm hauv Excel.

Pom zoo: