ZH-25 o3 issues

Hi guys.
I bought a winsen zh-25 ozon sensor, datasheet is here : https://www.winsen-sensor.com/d/files/air-quality/ze25-o3-ozone-module--manual1_1.pdf.

I am having troubles with reading the values from the sensor. I found a code for similar sensor (zh03). I edited the code in the next way:

#include <WinsenZE03.h>

WinsenZE03 sensor;

void setup() {
  sensor.begin(&Serial3, O3);
void loop() {
 float ppm = sensor.readManual();

It’s connected via serial connection and the wiring is correct… I am having trouble reading the bytes from the sensor. The library files are in attachment. I don’t really understand reading the bytes this way (stream function).
Any help is appreciated. Thx in advance for future answers, Tada :* .

WinsenZE03.cpp (2.09 KB)

WinsenZE03.h (667 Bytes)

Please provide a detailed explanation of what you mean by "I am having trouble reading the bytes from the sensor". Is there a failure in compilation or uploading, or does the code upload but not work as you expect? If the former, post the full text of the error output. If the latter, then describe the behavior you are expecting as well as the behavior you are experiencing that is not as expected.

thx for the answer.
The code uploads with no problems, the results are just zeroes. So i thought the stream function has to be the problem. I checked for the wires and all connections with multimeter.
I am having trouble with understanading 2 parts in the library: 1)

#ifndef WinsenZE03_h
#define WinsenZE03_h

#include "Arduino.h"
#define CO 1
#define SO2 2
#define NO2 2
#define O2 2
#define NH3 1
#define H2S 1
#define HF 1
#define CL2 2
#define O3 1

#define QA false
#define ACTIVE true

I dont know what does this do... I think that library is the same for multiple sensors??? From the ze03.h file
And 2)

void WinsenZE03::setAs(bool active){
  byte setConfig[] = {0xFF, 0x01, 0x78, 0x04, 0x00, 0x00, 0x00, 0x00, 0x83};//QA config
  byte response[9] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

  if (active){
    setConfig[3] =0x03;
    setConfig[8] =0x84;

I tried various combinations but none worked, so im stuck here. from the ze03.cpp file.

I've deleted your other cross post @DrPicasso.

Cross posting is against the rules of the forum. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend 15 minutes writing a detailed answer on this thread, without knowing that someone else already did the same in the other thread.

Repeated cross posting will result in a suspension from the forum.

In the future, please take some time to pick the forum section that best suits the topic of your question and then only post once to that forum section. This is basic forum etiquette, as explained in the sticky "How to use this forum - please read." post you will find at the top of every forum section. It contains a lot of other useful information. Please read it.

Thanks for your cooperation.

I am sorry for breaking the rules. But I thought it is better suited to be in the programming section. It is ok to delete this post and reupload to programming section?
Thx for the reply. Tada.

I've now moved it to the Programming Questions section for you. If you ever need a thread moved to a different forum section, just click the "Report to moderator" link at the bottom of the post and request that it be moved.