Plantower_PMS7003 Arduino Library - GitHub

文章推薦指數: 80 %
投票人數:10人

The PMS7003 is a particle matter counter capable of detecting particulates in the range of 0.3 to 10 microns. This device uses a serial connection to send ... Skiptocontent {{message}} jmstriegel / Plantower_PMS7003 Public Notifications Fork 4 Star 19 Plantower_PMS7003ParticulateMatterSensorLibraryForArduino BSD-3-ClauseLicense 19 stars 4 forks Star Notifications Code Issues 0 Pullrequests 0 Actions Projects 0 Wiki Security Insights More Code Issues Pullrequests Actions Projects Wiki Security Insights master Branches Tags Couldnotloadbranches Nothingtoshow {{refName}} default Couldnotloadtags Nothingtoshow {{refName}} default 1 branch 0 tags Code Latestcommit   Gitstats 4 commits Files Permalink Failedtoloadlatestcommitinformation. Type Name Latestcommitmessage Committime examples/pms_7003_test     Plantower_PMS7003.cpp     Plantower_PMS7003.h     README.md     license.txt     Viewcode Plantower_PMS7003ArduinoLibrary PMS7003 Interface Usage License README.md Plantower_PMS7003ArduinoLibrary AnArduinolibraryforinterfacingwiththePlantowerPMS7003laser particlecounter.ThisshouldalsoworkthethePMS5003sensor, astheysharethesameprotocol. PMS7003 ThePMS7003isaparticlemattercountercapableofdetecting particulatesintherangeof0.3to10microns. Thisdeviceusesaserialconnectiontosendmeasurementstoa connecteddeviceroughlyonceasecond.Concentrationmeasurements areprovidedforPM1.0(0.3-1.0um),PM2.5(1.0-2.5um),andPM10 (2.5-10.0um). ManufacturerSite Documentation(Mandarin) Review/Evaluation EnglishDocumentationforthe5003(sameprotocol) AmazonSearch(Roughly$40) Interface Interfacingwiththedeviceisviaanatypical1.27mmpitch10-pin (2x5row)maleheader.IrecommendusinganSWDbreakoutboardand cableforeasyprototyping--thepinoutistotallydifferentbutthey areeasytosource.Here'swhatIused: Female-to-FemaleSWDCable SWDBreakoutBoard Allofthedatapinsrequirea3.3vTTLlevel,butpowermustbe suppliedtoVCCat5v,whichisarequirementforproperoperation ofthebuilt-infan. Pinsarenumberedasshownbelow.Pin1isatthetopofthekeyed sideoftheconnector. +5vVCC12+5vVCC GND34GND Reset56N/C RX78N/C TX910Set ConnectingthePMS7003toacompatible3.3vdevicerequires4pins: Connectmicrocontroller+5vVCCorUSBtopin1(VCC). ConnectmicrocontrollerGNDtopin3(GND). ConnectmicrocontrollerTXtopin7(RX). ConnectmicrocontrollerRCtopin9(TX). Usage //Constructor Plantower_PMS7003sensor=Plantower_PMS7003(); voidsetup() { //Initializethesensorwiththeserialdevice //thatit'sconnectedto.HardwareSerial1isthe //default,ifnoparameterisprovidedtoinit() Serial1.begin(9600);//Note:9600baud sensor.init(&Serial1); } voidloop() { //UseupdateFrame()toreadinsensordatainyour //loopuntilhasNewData()returnstrue. sensor.updateFrame(); //Note:onceupdateFrame()iscalled,alldatais //invaliduntilhasNewData()returnstrue. if(sensor.hasNewData()) { //PM1.0:getPM_1_0() Serial.print("PM1.0:"); Serial.print(sensor.getPM_1_0()); //PM2.5:getPM_2_5() Serial.print("PM2.5:"); Serial.print(sensor.getPM_2_5()); //PM10:getPM_10_0() Serial.print("PM10:"); Serial.print(sensor.getPM_10_0()); Serial.println(); } } Afullexamplecanbefoundinpms_7003_test.ino. License ThislibrarywaswrittenbyJasonStriegelandprovided undertheBSDlicense.Seelicense.txtfordetails. About Plantower_PMS7003ParticulateMatterSensorLibraryForArduino Resources Readme License BSD-3-ClauseLicense Stars 19 stars Watchers 1 watching Forks 4 forks Releases Noreleasespublished Packages0 Nopackagespublished Contributors2     Languages C++ 100.0% Youcan’tperformthatactionatthistime. Yousignedinwithanothertaborwindow.Reloadtorefreshyoursession. Yousignedoutinanothertaborwindow.Reloadtorefreshyoursession.



請為這篇文章評分?