Cov txheej txheem:

DragonBoard410c - Xa Cov Ntaub Ntawv rau Ubidots: 3 Cov Kauj Ruam
DragonBoard410c - Xa Cov Ntaub Ntawv rau Ubidots: 3 Cov Kauj Ruam

Video: DragonBoard410c - Xa Cov Ntaub Ntawv rau Ubidots: 3 Cov Kauj Ruam

Video: DragonBoard410c - Xa Cov Ntaub Ntawv rau Ubidots: 3 Cov Kauj Ruam
Video: Tsab ntawv xa rau hmoob teb chaws 6 /23/23 2024, Hlis ntuj nqeg
Anonim
DragonBoard410c - Xa Cov Ntaub Ntawv rau Ubidots
DragonBoard410c - Xa Cov Ntaub Ntawv rau Ubidots

Ubidots tso cai rau koj los tsim daim ntawv qhia lub sijhawm tiag tiag los txheeb xyuas koj cov ntaub ntawv lossis tswj hwm koj li khoom siv. Qhia tawm koj cov ntaub ntawv los ntawm kev sib txuas rau pej xeem, lossis los ntawm kev kos nws hauv koj lub xov tooj ntawm tes lossis lub vev xaib.

Hauv qhov kev qhia no peb yuav xa cov ntaub ntawv mus rau lub platform siv DragonBoard 410c thiab Intel Arduino 101 board.

Cov laug cam sib txuas lus los ntawm kev sib txuas txuas thiab tsab ntawv nab nab tau txheeb xyuas cov ntaub ntawv thiab xa mus rau Ubidots.

Kauj ruam 1: Arduino Intel 101

Arduino Intel 101
Arduino Intel 101
Arduino Intel 101
Arduino Intel 101

Ua ntej tshaj plaws, cia rub cov lej:

$ git clone

Sab hauv cov ntaub ntawv koj tuaj yeem pom Arduino code txhawm rau upload hauv Arduino 101 board.

Qhib Arduino IDE thiab xaiv Arduino/ Genuino 101 board, yog tias koj tsis muaj qhov kev xaiv no, koj yuav tsum teeb tsa lub rooj tsavxwm hauv IDE.

Mus rau Cov Cuab Yeej-> pawg thawj coj-> tus thawj tswj hwm pawg, tshawb nrhiav intel thiab xaiv Intel Curie Boards pob.

Tom qab kev teeb tsa, koj tuaj yeem tso cov cai hauv Intel 101 pawg thawj coj.

Kauj ruam 2: Python Script

Python Tsab Ntawv
Python Tsab Ntawv
Python Tsab Ntawv
Python Tsab Ntawv
Python Tsab Ntawv
Python Tsab Ntawv
Python Tsab Ntawv
Python Tsab Ntawv

$ git clone

Python tsab ntawv ntshuam cov ntawv thiab Ubidots cov tsev qiv ntawv, yog li, cia rub tawm thiab teeb tsa nws.

  • $ sudo apt-tau nruab sej-pip
  • $ sudo pip nruab ubidots == 1.6.1
  • $ sudo pip nruab pyserial

Tam sim no, koj muaj qee qhov kev hloov kho hauv cov cai kom ua haujlwm raug.

kab 25 thiab 26:

api = ApiClient (token = 'TOKEN') # Hloov nrog koj li Ubidots Token ntawm no

api.save_collection ([{'sib txawv': 'VARIABLE_ID', 'tus nqi': raw [0]}])

TOKEN thiab VARIABLE_ID koj tuaj yeem pom hauv koj tus lej nyiaj hauv Ubidots raws li koj tuaj yeem pom hauv cov duab txuas.

Txuas Intel 101 pawg thawj coj mus rau DragonBoard thiab khiav dmesg txhawm rau txheeb xyuas USB chaw nres nkoj

$ dmesg

ntes nws thiab hloov kab 6:

PORT = "/dev/ttyACM0"

Yog tias koj tsis tau siv Ubidots ua ntej, ua raws cov theem hauv qab no:

  • Tsim ib tus account
  • ID nkag mus
  • Nyem rau ntawm koj daim duab, nyob ntawm sab xis sab xis ntawm qhov screen
  • Cov ntawv pov thawj API-> ntau dua-> tsim thiab hloov pauv koj lub cim
  • Tau txais tus nqi Token
  • Qhov chaw
  • Ntxiv cov ntaub ntawv qhov chaw
  • Ntxiv qhov sib txawv
  • Lub npe hloov pauv raws li koj xav tau
  • Tau txais qhov hloov pauv ID nyob ntawm sab laug ntawm tus yam ntxwv sib txawv.

Kauj Ruam 3: Khiav Txoj Cai thiab Pom Koj Cov Ntaub Ntawv hauv Ubidots

  • $ cd DragonBoard/
  • $ sudo nab hab sej Ubidots.py

Pom zoo: