Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5334

Automation, sensing and robotics • Re: CO2 NDIR sensor YYS clone sensor over uart

$
0
0
In the python code there is a printout
print("Checksum error from received: `{}'".format(binascii.hexlify(rcv)), file=sys.stderr)
which prints the received data.
On the screen shot attached, it is shows an empty byte array. So I assume there are no data received at all. In the Serial constructor, there is timeout=5 which will return whatever has been found within 5 sec on the serial line (which is nothing as shown in your screenshot).
This 5 sec interval should be observed when you run the program, should run about this interval.

I would propose to check connection to the sensor. Use your oscilloscope or logic analyzer to 'see' what is on the wires. You should see that the byte sequence is going out to the sensor, and then the sensor responds. For first tests, insert 1k resistors in series into the the tx-rx and rx-tx lines just in case you connect e.g. tx-tx or a tx to a gnd or vcc.

Statistics: Posted by ghp — Tue Dec 26, 2023 6:47 am



Viewing all articles
Browse latest Browse all 5334

Trending Articles