Reading data from a 3 in 1 gas sensor module

I have a 3 in 1 winsen gas sensor module that detects the concentration of 02,CO and CH4 it a modified module from a 4 in 1 gas sensor module (there are no libraries available for this module)

My question : how do I read it's data because the datasheet doesn't provide any information of how the data is streamed

Welcome to the forum

Please post a link to the datasheet

and i am using ESP8266 to interface

The module appears to have an RS 485 interface

image

but the "datasheet" has, as you say, no details of the serial protocol used. You could connect to its interface and see what your receive at various baud rates but without further details your chances of success are low

That "datasheet" is all they provide on their website
but it states "The module can output
the current concentration values of the four gases in real time through the digital serial port output."

If you have, or can get the hardware to read the serial port then give it a try

okay, since Serial.read can only read 1 byte at a time how can I read multiple bytes?

Read it byte by byte and save it for use later

See Serial input basics - updated

Also mind that the Arduino uses a TTL UART, not RS485 as that sensor. You need a chip like the MAX485 to convert from RS485 to TTL. For easy prototyping there are inexpensive modules available that have the MAX485 and supporting components in place.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.