Cov txheej txheem:

Fitbit Raspberry Pi: 13 Kauj Ruam
Fitbit Raspberry Pi: 13 Kauj Ruam

Video: Fitbit Raspberry Pi: 13 Kauj Ruam

Video: Fitbit Raspberry Pi: 13 Kauj Ruam
Video: Ben 10 Omniverse Galaxy Watch App (Randomizer) 2024, Kaum ib hlis
Anonim
Fitbit Raspberry Pi
Fitbit Raspberry Pi

Txoj haujlwm no qhia pom yuav siv Fitbit saib los tswj IO ntawm Raspberry Pi. Txoj haujlwm no tau tsim los ntawm Fitbit ionic. Tab sis nws yuav tsum ua haujlwm ntawm ib qho Fitbit saib nrog FItbit OS teeb tsa. Peb tuaj yeem tswj hwm ob qho tib si digital thiab analog chaw los ntawm kev siv pigpio thiab lub vev xaib lub tsev qiv ntawv uas khiav ntawm RPi. Txoj haujlwm no txhawb nqa 10 IO cov chaw nres nkoj ntawm RPI Chaw nres nkoj 1-5 tau teeb tsa rau Digital chaw nres nkoj uas tuaj yeem qhib/tawm. Chaw nres nkoj 6 -10 tau teeb tsa rau chaw nres nkoj Analog. Cov neeg siv tuaj yeem xa nce lossis txo tus nqi rau Analog chaw nres nkoj. Hauv txoj haujlwm no, peb ua piv txwv qhov chaw nres nkoj sib piv los ntawm kev siv servo. Thov nco ntsoov tias tus nqi analog yuav txawv nyob ntawm cov khoom siv analog.

Kauj Ruam 1: Npaj Txoj Haujlwm

Npaj Npaj
Npaj Npaj

Kho vajtse

1. Raspberry Pi (Peb sim ntawm RPi 3)

2. Cable rau RPI lub qhov (socket) IO

3. Breadboard nrog tsib LEDs thiab tsib 330 ohm resistors lossis

4. Kev pabcuam

5. Fitibit saib nrog Fitbit OS teeb tsa

Software

1. pigpio rau kev teeb tsa mus rau

2. lub vev xaib lub tsev qiv ntawv mus rau

3. Fitbit studio tus account mus rau

4. Fitbit OS Simulator rub tawm los ntawm

Yog xav paub ntxiv txog kev txhim kho Fitibt program mus rau

Kauj ruam 2: Rub tawm Software

Rub tawm Software
Rub tawm Software

1. Rub tawm qhov project los ntawm

2. Unzip qhov project cov ntaub ntawv.

3. Qhov program RPI's socket server nyob ntawm RPI/socket.js.

4. Txhua qhov Fitbit qhov project cov ntaub ntawv nyob hauv Fitbit phau ntawv teev npe.

Txog cov ntaub ntawv ntawm cov npe rau kev txhim kho fitbit, thov saib cov ncauj lus ntawm

Kauj Ruam 3: Tsim Tus Kheej rau Fitbit Studio

Tsim tus lej rau Fitbit Studio
Tsim tus lej rau Fitbit Studio

1. Mus rau studio.fitbit.com

2. Sau npe rau Fitbit studio tshiab ntawm studio.fitbit.com.

Kauj Ruam 4: Tsim Fitbit Application Project

Tsim Fitbit Application Project
Tsim Fitbit Application Project
Tsim Fitbit Application Project
Tsim Fitbit Application Project
Tsim Fitbit Application Project
Tsim Fitbit Application Project

1. Mus rau studio.fitbit.com

2. Tom qab nkag mus, nyem qhov haujlwm tshiab.

3. Sau lub phiaj xwm tshiab lub npe. Xaiv qhov khoob qhov qauv thiab nyem tsim.

4. Xaiv txhua cov ntaub ntawv thiab cov ntawv tais uas unzip los ntawm kauj ruam 1.

5. Luag txhua cov ntaub ntawv rau hauv Project files area.

Kauj Ruam 5: Pib Tsim Tus Choj ntawm Txawb Fitbit

Pib Tsim Tus Choj ntawm Txawb Fitbit
Pib Tsim Tus Choj ntawm Txawb Fitbit
Pib Tsim Tus Choj ntawm Txawb Fitbit
Pib Tsim Tus Choj ntawm Txawb Fitbit
Pib Tsim Tus Choj ntawm Txawb Fitbit
Pib Tsim Tus Choj ntawm Txawb Fitbit
Pib Tsim Tus Choj ntawm Txawb Fitbit
Pib Tsim Tus Choj ntawm Txawb Fitbit

1. Pib Fitbit daim ntawv thov (ntawm txawb).

2. Xaiv Account nyob rau sab saud.

3. Hauv qab cov cuab yeej, xaiv koj tus qauv saib.

4. Xaiv Developer Menu.

5. Pab kom Tus Tsim Kho Choj. Tos cov lus hloov pauv los ntawm kev txuas mus txuas nrog

Kauj Ruam 6: Pib Tsim Tus Saib Xyuas ntawm Fitbit Watches

Pib Tsim Tawm ntawm Fitbit Watches
Pib Tsim Tawm ntawm Fitbit Watches
Pib Tsim Tawm ntawm Fitbit Watches
Pib Tsim Tawm ntawm Fitbit Watches

1. Mus Rau Qhov Chaw.

2. Scroll cia kom txog thaum pom "Developer Bridge".

3. Xaiv qhov kev txiav txim rau Txuas rau Server.

4. Tos kom txog thaum pom cov lus "Txuas nrog Debugger".

Kauj Ruam 7: Txuas Fitbit Studio Nrog Txawb thiab Saib

Txuas Fitbit Studio Nrog Txawb thiab Saib
Txuas Fitbit Studio Nrog Txawb thiab Saib

1. Nyob saum cov ntawv qhia zaub mov, nyem Xaiv ib lub cuab yeej.

2. Xaiv peb lub moos.

3. Nyob saum cov ntawv qhia zaub mov, nyem Xaiv lub xov tooj.

4. Xaiv peb lub xov tooj.

5. Tos ob lub xov tooj thiab cov cuab yeej qhia txuas

Kauj Ruam 8: Nruab Qhov program ntawm Saib

Nruab qhov program ntawm Saib
Nruab qhov program ntawm Saib
Nruab qhov program ntawm Saib
Nruab qhov program ntawm Saib

1. Nyob saum cov ntawv qhia zaub mov, nyem Khiav.

Lub Fitbit studio yuav pib sau thiab rub tawm cov program ntawm ob lub xov tooj thiab saib.

2. Scroll saib lub vijtsam mus rau sab laug kom pom seb qhov program tau teeb tsa lawm.

3. Mus rau Fitbit daim ntawv thov

4. Xaiv Account nyob rau sab laug.

5. Hauv qab cov cuab yeej, xaiv koj tus qauv saib.

6. Xaiv Developer Menu.

7. Koj yuav tsum pom qhov program teeb tsa hauv Sideloaded App

Kauj Ruam 9: Txuas IO rau RPI

Txuas IO rau RPI
Txuas IO rau RPI
Txuas IO rau RPI
Txuas IO rau RPI
Txuas IO rau RPI
Txuas IO rau RPI

1. Txuas IO Qhov (Socket) nrog lub khob cij los ntawm kab.

2. Txuas LED mus rau IO chaw nres nkoj nrog 330 Ohm Resistor los txwv qhov tam sim no.

3. Txuas Servo nrog IO chaw nres nkoj uas tau muab rau qhov chaw nres nkoj analog

Kauj ruam 10: Nruab Software rau RPI

1. Nruab lub vev xaib lub tsev qiv ntawv siv cov lus txib

npm nruab --save ws

2. Nruab pigpio tsev qiv ntawv

sudo apt-tau hloov tshiab

sudo apt-tau nruab pigpio

3. Rub tawm qhov program socket.js los ntawm https://github.com/wtos03/RaspFit nyob rau hauv cov npe RPI

4. Muab socket.js tso rau hauv tsev.

Kauj Ruam 11: Pib Txoj Haujlwm ntawm RPI

1. Khiav cov lus txib

$ sudo node socke.js

2. Txhawm rau pib qhov program thaum pib RPI. Ntxiv kab hais kom ua hauv /etc/rc.local

Kauj Ruam 12: Kuaj thiab Khiav Haujlwm

1. Pib Fitbit Applicaiton ntawm Txawb

2. Xaiv Account nyob rau sab saud.

3. Hauv qab cov cuab yeej, xaiv koj tus qauv saib.

4. Xaiv Developer Menu.

5. Xaiv qhov program teeb tsa hauv Sideloaded App.

6. Xaiv Chaw

7. Teeb IP Chaw Nyob ntawm RPI thiab Chaw Nres Nkoj (Txoj haujlwm no siv 4000)

8. Kho kauj ruam rau tus nqi sib piv yog xav tau (Default = 20)

9. Rov qab thiab tawm ntawm Fitbit Application

10. Pib qhov program ntawm Fitbit saib.

11. Xaiv qhov chaw nres nkoj koj xav tswj

12. Khawm ntawm txoj cai siv rau ON/OFF cov cuab yeej

13. Cov nyees khawm ntawm sab laug siv rau qhov nce/txo qis tus nqi analog

Kauj ruam 13: Teeb meem

Yuam kev: Tsis tuaj yeem tswj I/O ntawm RPI

- Txheeb xyuas lub network los ntawm ping RPI qhov chaw nyob.

- Tawm qhov kev zov me nyuam ntawm Fitbit saib thiab RPI.

- Pib Fitbit Application thiab Sync nrog Fitbit saib.

- Pib qhov program ntawm RPI.

- Pib txoj haujlwm ntawm Fitbit saib.

Pom zoo: