Cov txheej txheem:

Siv Arduino MKR Shields Nrog Raspberry Pi: 8 Kauj Ruam
Siv Arduino MKR Shields Nrog Raspberry Pi: 8 Kauj Ruam

Video: Siv Arduino MKR Shields Nrog Raspberry Pi: 8 Kauj Ruam

Video: Siv Arduino MKR Shields Nrog Raspberry Pi: 8 Kauj Ruam
Video: siv servo motors controlled by joystick ver04 2024, Hlis ntuj nqeg
Anonim
Siv Arduino MKR Shields Nrog Raspberry Pi
Siv Arduino MKR Shields Nrog Raspberry Pi
Siv Arduino MKR Shields Nrog Raspberry Pi
Siv Arduino MKR Shields Nrog Raspberry Pi
Siv Arduino MKR Shields Nrog Raspberry Pi
Siv Arduino MKR Shields Nrog Raspberry Pi

Peb PiMKRHAT yog lub khoos phis tawj HAT siv Arduino MKR cov laug cam thiab thaiv ua ke nrog Raspberry Pi. Txawv Arduino MKR Shields tuaj yeem siv ntawm peb HAT raws li txuas ntxiv rau Raspberry Pi. Kuv xav qhia hauv qhov haujlwm me me no yuav siv Arduino MKR ENV daim ntaub thaiv nrog Raspberry Pi hauv qab Python li cas.

Kauj Ruam 1: Cov Cuab Yeej thiab Cov Khoom

Cov Cuab Yeej thiab Cov Khoom
Cov Cuab Yeej thiab Cov Khoom
Cov Cuab Yeej thiab Cov Khoom
Cov Cuab Yeej thiab Cov Khoom

Cov ntaub ntawv:

  • Raspberry Pi
  • SD daim npav
  • Arduino MKR ENV daim thaiv
  • PiMKRHAT

Cov Cuab Yeej:

  • Soldering hlau
  • hlau xaim
  • sab txiav
  • khoov cuab yeej

Kauj ruam 2: Sib dhos

Los ua ke
Los ua ke

PiMKRHAT los ua cov khoom siv. Koj yuav tsum sib sau ua ntej. Thov ua raws li cov lus qhia los ua ke

Kauj Ruam 3: Teeb Jumper

Thov teeb tsa rau Arduino MKR ENV daim thaiv tsuas yog 5V thiab 3, 3V Jumper ntawm lub txhab nyiaj fais fab. Cia tag nrho lwm cov dhia dhia qhib.

Kauj ruam 4: Raspbian

Thov rub tawm Raspbian OS tshiab tshaj plaws rau Raspberry Pi thiab luam nws mus rau SD daim npav ntawm Pi imager lossis Win32diskimager.

Kauj Ruam 5: Kho I2C

Cov ntsuas ntawm MKR ENV daim thaiv yog siv I2C kev sib txuas lus. Koj yuav tsum teeb tsa qee lub tsev qiv ntawv ua ntej ntawm bash:

sudo apt-tau nruab -y nab hab sej-smbus

sudo apt-tau nruab -y i2c-cuab yeej

Tam sim no koj yuav tsum pab kom I2C interface:

sudo raspi-teeb tsa

5 Kev sib cuam tshuam kev xaiv P5 I2C YOG YOG sudo rov pib dua

Kauj Ruam 6: Xeem I2C Interface

Kuaj I2C Interface
Kuaj I2C Interface

Tam sim no nws yog lub sijhawm los sim I2C interface:

sudo i2cdetect -y 1

Qhov no qhia tau tias peb qhov chaw nyob I2C tau siv - 0x10, 0x5c thiab 0x5f

Kauj Ruam 7: Txhim Kho Tsev Qiv Ntawv Ntxiv

sudo apt nruab python-pip

sudo pip nruab veml6075

Kauj Ruam 8: Kuaj Koj Txoj Haujlwm

Kuaj Koj Txoj Haujlwm
Kuaj Koj Txoj Haujlwm

3 qhov khoos phis tawj me me muaj nyob ntawm Github txhawm rau ntsuas UV hluav taws xob, ntsuas kub & av noo thiab ntsuas qhov ntsuas ntawm MKR ENV daim thaiv:

  • HTS221.py -kub thiab av noo
  • LPS22HB.py - siab
  • VEML6075.py - UV tawg

Lub teeb pom kev zoo sib xws xav tau cov lus sib piv thiab tsis tuaj yeem siv nrog Raspberry Pi.

Pom zoo: