Cov txheej txheem:

Dej Ntes Los Siv Arduino thiab Dej Los Dej Sensor: 8 Kauj Ruam
Dej Ntes Los Siv Arduino thiab Dej Los Dej Sensor: 8 Kauj Ruam

Video: Dej Ntes Los Siv Arduino thiab Dej Los Dej Sensor: 8 Kauj Ruam

Video: Dej Ntes Los Siv Arduino thiab Dej Los Dej Sensor: 8 Kauj Ruam
Video: Deep Cut Loses their Sponsorship (Splatoon animation) 2024, Kaum ib hlis
Anonim

Hauv qhov kev qhia no peb yuav kawm paub yuav ntsuas nag li cas siv lub ntsuas cua los nag thiab ua lub suab siv lub tswb nrov thiab OLED Zaub thiab Visuino.

Saib cov yees duab.

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
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi

Arduino UNO (lossis lwm yam Arduino) Tau nws ntawm no

Los nag sensor module, Tau nws ntawm no

Jumper xov hlau

Breadboard Tau nws ntawm no

OLED Zaub Tau nws ntawm no

Piezo buzzer Tau nws ntawm no

Visuino program: Rub tawm Visuino

Kauj ruam 2: Circuit Court

Qhov Circuit
Qhov Circuit
  • Txuas OLED Display pin [VCC] rau Arduino tus pin [5V]
  • Txuas OLED Display pin [GND] rau Arduino tus pin [GND]
  • Txuas OLED Display pin [SDA] rau Arduino tus pin [SDA]
  • Txuas OLED Display pin [SCL] rau Arduino tus pin [SCL]
  • Txuas Arduino 5V rau piezo buzzer module tus pin VCC
  • Txuas Arduino GND rau piezo buzzer module tus pin GND
  • Txuas Arduino tus pin 2 rau piezo buzzer module tus pin S (teeb liab)
  • Txuas Arduino 5V los nag sensor module tus pin VCC
  • Txuas Arduino GND los nag sensor module tus pin GND
  • Txuas Arduino analog pin 0 los nag sensor module tus pin A0

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 ADD Cheebtsam

Hauv Visuino ADD Cheebtsam
Hauv Visuino ADD Cheebtsam
Hauv Visuino ADD Cheebtsam
Hauv Visuino ADD Cheebtsam
Hauv Visuino ADD Cheebtsam
Hauv Visuino ADD Cheebtsam
  • Ntxiv "OLED Display" tivthaiv
  • Ntxiv "Digital (Boolean) Inverter (Tsis)" tivthaiv
  • Ntxiv "Ncua Sijhawm" tivthaiv

Kauj Ruam 5: Hauv Visuino Teeb Cov Khoom

Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem
  • Ob npaug nias rau ntawm DisplayOLED1 thiab hauv lub qhov rai ntsiab lus rub "Kos cov ntawv" mus rau sab laug.
  • Hauv cov khoom qhov rai teeb tsa me me rau 2, sau ntawv mus rau: RAINING! thiab Y txog 20 Kaw cov ntsiab lus qhov rai
  • Xaiv Delay1 thiab hauv cov khoom qhov rai hloov pauv mus rau 3000000

Kauj Ruam 6: Hauv Visuino Connect Components

Hauv Visuino Connect Components
Hauv Visuino Connect Components
Hauv Visuino Connect Components
Hauv Visuino Connect Components
  • Txuas Arduino analog pin 0 rau Inverter1 tus pin In
  • Txuas Inverter1 tus pin Tawm mus rau qeeb 1 tus pin Pib thiab DisplayOLED1> Kos Text1 tus pin Moos thiab Arduino Digital tus pin 2
  • Txuas Delay1 tus pin tawm mus rau DisplayOLED1> Sau Screen1 tus pin moos
  • Txuas DisplayOLED1 tus pin I2C Tawm rau Arduino board tus pin I2C Hauv

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

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

Hauv Visuino, hauv qab nyem rau ntawm "Tsim" Tab, xyuas kom tseeb tias qhov chaw nres nkoj raug xaiv, tom qab ntawd nyem rau ntawm "Compile/Build and Upload" khawm.

Kauj ruam 8: Ua si

Yog tias koj ua lub zog Arduino UNO tus qauv, thiab tso qee cov dej tso rau ntawm lub ntsuas dej nag lub teeb pom kev LED yuav tsum pib qhia cov ntawv "RAINING!" thiab lub suab nrov nrov yuav tsum ua suab.

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

Pom zoo: