Cov txheej txheem:

Force Sensing Resistor (FSR) Arduino Yooj Yim Qhia: 8 Kauj Ruam
Force Sensing Resistor (FSR) Arduino Yooj Yim Qhia: 8 Kauj Ruam

Video: Force Sensing Resistor (FSR) Arduino Yooj Yim Qhia: 8 Kauj Ruam

Video: Force Sensing Resistor (FSR) Arduino Yooj Yim Qhia: 8 Kauj Ruam
Video: Force Sensitive Resistors - Pressure Sensing for your Arduino Projects 2024, Kaum ib hlis
Anonim
Image
Image

Hauv qhov kev qhia no peb yuav kawm paub yuav txheeb xyuas qhov quab yuam siv rau Force Sensing Resistor (FSR) thiab muab tso rau ntawm OLED Display + peb yuav teeb tsa txwv nrog ntsuab thiab liab LED.

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. Lub zog sensor
  3. OLED zaub
  4. Liab & Ntsuab LED
  5. 1K ohm tiv thaiv
  6. Jumper xov hlau
  7. Cov qhob cij
  8. Visuino program: Rub tawm Visuino

Kauj Ruam 2: 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 3: Hauv Visuino Ntxiv Cheebtsam

Hauv Visuino Ntxiv Cheebtsam
Hauv Visuino Ntxiv Cheebtsam
Hauv Visuino Ntxiv Cheebtsam
Hauv Visuino Ntxiv Cheebtsam
  1. Ntxiv "SSD1306/SH1106 OLED Display (I2C)" tivthaiv
  2. Ntxiv 2x "Sib piv Tus Nqi Analog" tivthaiv

Kauj Ruam 4: 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
Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem
  1. Ob npaug nias rau ntawm "DisplayOLED1" tivthaiv thiab hauv "Elements" dialog window drag "Text Field" mus rau sab laug
  2. xaiv ntawm sab xis "Text Field1" thiab hauv cov khoom qhov rai teeb tsa loj: 3 thiab Y: 40
  3. Xaiv "CompareValue1" tivthaiv thiab hauv lub qhov rai qhov khoom teeb tsa Sib piv Hom: ctSmallerOrEqualand tus nqi: 0.1 "CompareValue1" yog siv los ua rau Green LED, nws txhais tau tias thaum twg tus nqi nkag tau me dua lossis sib npaug rau 0.1 ua rau LED
  4. Xaiv "CompareValue2" tivthaiv thiab hauv cov khoom qhov rai teeb tsa Sib piv Hom: ctBigger

thiab tus nqi: 0.1 "Sib pivValue2" tau siv los ua rau LED liab, nws txhais tau tias thaum twg tus nqi nkag tau loj dua 0.1 ua rau lub teeb liab liab

Kauj Ruam 5: Hauv Visuino Connect Components

Hauv Visuino Connect Components
Hauv Visuino Connect Components
Hauv Visuino Connect Components
Hauv Visuino Connect Components
  1. Txuas Arduino Analog Out pin [0] rau "CompareValue1" tiv thaiv tus pin [Hauv]
  2. Txuas Arduino Analog Out pin [0] rau "CompareValue2" tiv thaiv tus pin [Hauv]
  3. Txuas Arduino Analog Out pin [0] rau "DisplayOLED1> Text Field1" tiv thaiv tus pin [Hauv]
  4. Txuas "DisplayOLED1" tivthaiv rau Arduino I2C tus pin [Hauv]
  5. Txuas "CompareValue1" tiv thaiv tus pin [Tawm] rau Arduino tus lej digital [8]
  6. Txuas "CompareValue2" tiv thaiv tus pin [Tawm] rau Arduino tus lej digital [7]

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

Yog tias koj ua lub zog Arduino UNO module, thiab nias lub zog ntsuas qhov ntsuas koj yuav tsum pom tus lej hloov pauv ntawm OLED zaub thiab LED ntsuab yuav tsum pom tab sis thaum koj tsoo qhov txwv liab liab yuav tsum ci.

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:

Kauj ruam 8: Circuit Court

Circuit Court
Circuit Court
  1. Txuas Arduino Tus lej Zoo [5V] rau OLED tus pin [VCC] thiab Force sensor tus pin [1]
  2. Txuas Arduino Negative pin [GND] rau OLED pin [GND]
  3. Txuas OLED Display pin [SDA] rau Arduino tus pin [SDA]
  4. Txuas OLED Display pin [SCL] rau Arduino tus pin [SCL]
  5. Txuas Force sensor tus pin [2] rau Arduino Analog tus pin [0]
  6. Txuas Force sensor pin [2] rau 1K ohm resistor
  7. Txuas lwm sab ntawm tus tiv thaiv rau Arduino Negative pin [GND]
  8. Txuas Ntsuab LED tsis zoo tus pin rau Arduino tus pin [GND]
  9. Txuas Ntsuab LED Zoo tus pin rau Arduino Digital tus pin [8]
  10. Txuas Liab LED tsis zoo tus pin rau Arduino tus pin [GND]
  11. Txuas Liab LED Zoo tus pin rau Arduino Digital tus pin [7]

Pom zoo: