-->
Page 1 of 1

Issues reading PMS7003 Sensor in combination with LCD

PostPosted: Wed Apr 10, 2019 12:28 pm
by TonyK59
Hello,

I have a sketch where data is read from a Plantower PMS7003 sensor using ports D6 and D8 as serial ports. In the same sketch I am writing data to an LCD ILI9341

This is the hardware config of the LCD :

/* (SPI: */
/* - ILI9341 SCK => GPIO14 */
/* - ILI9341 MISO NC */
/* - ILI9341 MOSI => GPIO13 */
/* - ILI9341 D/C => GPIO16 */
/* - ILI9341 RST => RST */
/* - ILI9341 CS => GND */
/* - ILI9341 LED => 3V3) */

Whenever I use the code for addressing the LCD writing to the LCD (which works fine) the PMS sensor gets read only ONCE ! As soon as I comment out the code for the LCD it works. Any idea what miht cause this ?

Full sketch available on request.

Thanks for any advice !

Tony

Re: Issues reading PMS7003 Sensor in combination with LCD

PostPosted: Wed Apr 10, 2019 4:10 pm
by btidey
This is just a guess.

Although you are not connecting MISO (GPIO12, D6) it is possible the display library is and is then confusing your serial handling.

Maybe try using GPIO04 (D2) or GPIO05 (D1) as alternative pins for the serial to avoid any potential conflict.