Hi.
I have set up my Uno, PMS5003, 10K pot & LCD screen & uploaded a sketch as per a website & video tutorial online.. however the narrator of the video speaks too fast in a very strong accent which I cannot easily follow & the screen resolution is poor (but thank you how2electronics.com) & the website has step by step guide but I am missing a vital step because the sketch loads (my 3rd or 4th go at running anything) but nothing happens.
I am missing 1 vital step which I cannot fathom. It gives a long code for the set up without a screen then it says this;
"The source code for interfacing PM2.5 PMS5003 Air Quality Sensor with Arduino and LCD Display is given below.
Simply copy the code and upload to the Arduino UNO Board.
But before that you need to add the library for PMS5003 Sensor. So simply install the following library from the library manager"
I have installed the library but I assume it needs to be referenced somehow..right ?
It gives this extra(?) coding... but where does that go ?..at the front or at the end of the initial coding ??
#include "PMS.h"
#include "SoftwareSerial.h"
#include <LiquidCrystal.h>
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);
SoftwareSerial Serial1(2, 3); // RX, TX
PMS pms(Serial1);
PMS::DATA data;
void setup()
{
Serial1.begin(9600);
lcd.begin(20,4);
lcd.setCursor(0, 0);
lcd.print("Warming up");
delay(4000);
lcd.clear();
}
void loop()
{
if (pms.read(data))
{
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Dust Concentration");
lcd.setCursor(0, 1);
lcd.print("PM1.0 :" + String(data.PM_AE_UG_1_0) + "(ug/m3)");
lcd.setCursor(0, 2);
lcd.print("PM2.5 :" + String(data.PM_AE_UG_2_5) + "(ug/m3)");
lcd.setCursor(0, 3);
lcd.print("PM10 :" + String(data.PM_AE_UG_10_0) + "(ug/m3)");
delay(1000);
}
}
I hope I have explained myself adequately.
The guidelines said not to post any links.
Thanks in advance
Togs