Cov txheej txheem:

Yuav Siv Li Cas & Siv GY -30 BH1750 Lub Teeb Pom Kev Zoo (GY30 / GY302) - Yooj Yim - Arduino Project !: 7 Kauj Ruam
Yuav Siv Li Cas & Siv GY -30 BH1750 Lub Teeb Pom Kev Zoo (GY30 / GY302) - Yooj Yim - Arduino Project !: 7 Kauj Ruam

Video: Yuav Siv Li Cas & Siv GY -30 BH1750 Lub Teeb Pom Kev Zoo (GY30 / GY302) - Yooj Yim - Arduino Project !: 7 Kauj Ruam

Video: Yuav Siv Li Cas & Siv GY -30 BH1750 Lub Teeb Pom Kev Zoo (GY30 / GY302) - Yooj Yim - Arduino Project !: 7 Kauj Ruam
Video: yuav ntseeg li cas thiaj hu tau tias yog tus ntseeg tiag. 2024, Hlis ntuj nqeg
Anonim
Image
Image

Hauv qhov kev qhia no peb yuav kawm paub sai thiab yooj yim siv GY-30 BH1750 lub teeb pom kev zoo nrog Arduino.

Saib daim vis dis aus.

Kauj ruam 1: Yam Koj Yuav Tsum Tau

Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
  1. Arduino UNO (lossis lwm yam Arduino)
  2. GY-30 BH1750 lub teeb pom kev zoo
  3. OLED Zaub
  4. Cov qhob cij
  5. Jumper xov hlau
  6. Visuino program: Rub tawm Visuino

Kauj ruam 2: Circuit Court

Qhov Circuit
Qhov Circuit
  1. Txuas Arduino tus pin zoo [5V] rau breadboard tus pin zoo [Kab liab]
  2. Txuas Arduino tus lej tsis zoo [GND] mus rau lub khob cij tsis zoo tus pin [BlueLine]
  3. Txuas Arduino tus pin [SCL] mus rau daim phiaj
  4. Txuas Arduino tus pin [SDA] mus rau daim phiaj
  5. Txuas OLED Display pin [SCL] mus rau lub khob cij <tib txoj kab uas Arduino tus pin [SCL] txuas nrog
  6. Txuas OLED Display pin [SDA] rau breadboard <tib txoj kab uas Arduino tus pin [SDA] txuas nrog
  7. Txuas OLED Display pin [VCC] rau breadboard tus pin zoo [Kab liab]
  8. Txuas OLED Display pin [GND] rau breadboard tsis zoo tus pin [BlueLine]
  9. Txuas Lub Teeb Sensor tus pin [SCL] rau lub khob cij <tib txoj kab uas Arduino tus pin [SCL] txuas nrog
  10. Txuas Lub Teeb Sensor tus pin [SDA] rau lub khob cij <tib txoj kab uas Arduino tus pin [SDA] txuas nrog
  11. Txuas Lub Teeb Sensor tus pin [VCC] mus rau lub rooj noj mov zoo tus pin [Kab Kab Liab]
  12. Txuas Lub Teeb Sensor tus pin [GND] mus rau lub khob cij tsis zoo tus pin [BlueLine]

Kauj Ruam 3: Pib Visuino, thiab Xaiv Arduino UNO Board Type

Pib Visuino, thiab Xaiv Arduino UNO Board Type
Pib Visuino, thiab Xaiv Arduino UNO Board Type
Pib Visuino, thiab Xaiv Arduino UNO Board Type
Pib Visuino, thiab Xaiv Arduino UNO Board Type

Txhawm rau pib ua haujlwm rau Arduino, koj yuav tsum muaj Arduino IDE teeb tsa los ntawm no:

Thov nco ntsoov tias muaj qee qhov teeb meem tseem ceeb hauv Arduino IDE 1.6.6. Nco ntsoov tias koj nruab 1.6.7 lossis siab dua, txwv tsis pub Cov Lus Qhia no yuav tsis ua haujlwm! Yog tias koj tsis tau ua raws cov kauj ruam hauv Phau Ntawv Qhia no teeb tsa Arduino IDE rau program Arduino UNO! Visuino: https://www.visuino.eu tseem yuav tsum tau teeb tsa. Pib Visuino raws li pom hauv thawj daim duab Nyem rau ntawm "Cov cuab yeej" khawm ntawm Arduino tivthaiv (Daim Duab 1) hauv Visuino Thaum qhov kev sib tham tshwm, xaiv "Arduino UNO" raws li qhia hauv daim duab 2

Kauj Ruam 4: Hauv Visuino Ntxiv & Teeb Khoom

Hauv Visuino Ntxiv & Teeb Khoom
Hauv Visuino Ntxiv & Teeb Khoom
Hauv Visuino Ntxiv & Teeb Khoom
Hauv Visuino Ntxiv & Teeb Khoom
Hauv Visuino Ntxiv & Teeb Khoom
Hauv Visuino Ntxiv & Teeb Khoom
Hauv Visuino Ntxiv & Teeb Khoom
Hauv Visuino Ntxiv & Teeb Khoom
  1. Ntxiv "ROHM BH1750 Ambient Light Sensor (I2C)" tivthaiv
  2. Ntxiv "SSD1306/SH1106 OLED Display (I2C)" tivthaiv
  3. Ob npaug nias rau "DisplayOLED1" tivthaiv thiab hauv "Elements" qhov rai luag "Text Field" mus rau sab laug
  4. Ntawm sab laug ces xaiv "TextField1" thiab hauv cov khoom qhov rai teeb tsa qhov loj: 3

Kauj Ruam 5: Hauv Visuino Connect Components

Hauv Visuino Connect Components
Hauv Visuino Connect Components
  1. Txuas "LightSensor1" tiv thaiv tus pin [Tswj] rau Arduino I2C tus pin [Hauv]
  2. Txuas "LightSensor1" tiv thaiv tus pin [Tawm] rau "DisplayOLED1> TextField1" tiv thaiv tus pin [Hauv]
  3. Txuas "DisplayOLED1" tiv thaiv tus pin [Tawm] rau Arduino I2C tus pin [Hauv]

Kauj Ruam 6: Tsim, Ua Ke, thiab Tshaj Tawm Arduino Code

Tsim, Sau, thiab Tso Tawm Arduino Code
Tsim, Sau, thiab Tso Tawm Arduino Code
Tsim, Sau, thiab Tso Tawm Arduino Code
Tsim, Sau, thiab Tso Tawm Arduino Code

Hauv Visuino, Nias F9 lossis nyem rau ntawm lub pob uas qhia ntawm daim duab 1 los tsim Arduino code, thiab qhib Arduino IDE

Hauv Arduino IDE, nyem rau ntawm Upload khawm, txhawm rau sau thiab xa cov cai (Daim duab 2)

Kauj ruam 7: Ua si

Ua si
Ua si

Yog tias koj ua lub zog Arduino UNO module, Cov Zaub yuav pib qhia pom lub teeb pom kev zoo uas nws tau txais los ntawm Lub Teeb Pom Kev.

Nco tseg: Yog tias koj tsis muaj OLED Zaub koj tsuas tuaj yeem xaim "ListSensor1" tus pin [Tawm] rau Arduino Serial [0] tus pin [Hauv] thiab saib xyuas lub teeb pom kev hauv Visuino Serial Tab (Duab 1)

Nrog koj zoo siab! Koj tau ua tiav koj txoj haujlwm nrog Visuino. Kuj txuas nrog yog Visuino qhov haujlwm, uas kuv tau tsim rau qhov Qhia Qhia no. Koj tuaj yeem rub nws ntawm no thiab qhib nws hauv Visuino:

Pom zoo: