UART c2h4 sensor communication problem

hello,I am currently communicating with c2h4 sensors(ze11-c2h4). Arduino nano is used for communication
Below is the datasheet and my code
The return value is only 0 and 1. I don’t know how to continue writing the program.
Please can provide guidance, thank you very much
(ps. The range of c2h4 sensor is 0-100ppm)

#include <SoftwareSerial.h>
SoftwareSerial mySerial(9, 10); // RX, TX
unsigned char hexdata[9] = {0xFF,0x01,0x86,0x00,0x00,0x00,0x00,0x00,0x79}; //Read the gas density command
void setup() {

while (!Serial) {



void loop() {

for(int i=0,j=0;i<9;i++)
if (mySerial.available()>0)
long hi,lo,C2H4;

if(i==4){ hi=ch; } //High concentration
if(i==5){ lo=ch; } //Low concentration
if(i==8) {
C2H4=hi*256+lo; //C2H4 concentration}
Serial.print("C2H4 concentration: ");




(there are code in datasheet about communcation with ze11-c2h4)
(I don’t know how to realize the meaning of datasheet hope someone can tell me how to code )

ze11-electrochemical-module-manualv1_3.pdf (532 KB)

I don't know what your code is supposed to be doing but this is obviously wrong:

unsigned char hexdata[9] = {0xFF,0x01,0x86,0x00,0x00,0x00,0x00,0x00,0x79}; //Read the gas density command

You say is unsigned, but some of the entries are OBVIOUSLY signed negatively. Why?


I refer to the program on this website
there are code in ze11-c2h4 datasheet
but actually I don't know the mean of datasheet