Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By TonyK59
#81679 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
User avatar
By btidey
#81681 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.