Giter Club home page Giter Club logo

esp32_s8's Introduction

ESP32_S8

Evaluating the CO2-Sensor S8 from SenseAir. https://senseair.com/products/size-counts/s8-5/

Code for Arduino (.ino) with some routines to read all register and another code for esp-idf in C. (.c)

Technical information:

There is no standard library available now - since the functionality / documentation is poor.

The flow is very simple:

Send a request like {0xFE, 0X04, 0X00, 0X03, 0X00, 0X01, 0XD5, 0XC5} and
wait for the response like {0xFE, 0X04, 0X02, 0X03, 0X88, 0XD5, 0XC5}.
Where:

byte example description on request
0 0xFE any Address
1 0x04 function code (03 read hold reg / 04 read inp. register / 06 write)
2, 3 0x00 0x03 starting Address
4, 5 0x00 0x01 lenght of requested register
6, 7 0xD5 0xC5 CRC low / high

In the response the first two byte are the same as in the request 0xFE and 0x04.
The requested value is in byte 3 and 4 (0x03) and (0x88) with low-byte first. so 88 * 256 + 03. .. followed by two byte for CRC.

esp32_s8's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

esp32_s8's Issues

merci

thank for your program ! work very well
use portion of your code for S8 and ESP32S2, with Arduino ESP32 Version 2.0.3-RC1

Typos

Hello,

In the following sentence, I guess you meant 256, not 265: "The requested value is in byte 3 and 4 (0x03) and (0x88) with low-byte first. so 88 * 265 + 03. .. followed by two byte for CRC."

Other typos:
"There is no standard library aviable"
"lenght"
"the frist"

Cheers,

error 99

Hello, I bought an esp 32 and a senseair s8 for a school project and tryied your code. But I only have an error 99 and don't know why. what does it mean exactly ? thank you in advance for your answer.
Eliot

Weird SenseAir S8 CO2 response

Hello. I try to use your library with the SenseAir S8 sensor. It seems to work fine (The sensor is responding to UART commands), but it returns weird CO2 values:

[1B][0;32mI (24032) Info: ABC-Period 180 [1B][0m
[1B][0;32mI (28032) Info: Firmware: 335 [1B][0m
[1B][0;32mI (32032) Info: Sensor-ID 793 [1B][0m
[1B][0;32mI (36032) Info: Sensor-ID 11344 [1B][0m
Sending data 
Response[0] = fe 
Response[1] = 04 
Response[2] = 02 
Response[3] = 22 
Response[4] = c3 
Response[5] = f5 
Response[6] = d5 
[1B][0;32mI (37082) Receive_TASK: CO2 8899 [1B][0m
Sending data 
Response[0] = fe 
Response[1] = 04 
Response[2] = 02 
Response[3] = 22 
Response[4] = bf 
Response[5] = f4 
Response[6] = 34 
[1B][0;32mI (42082) Receive_TASK: CO2 8895 [1B][0m

The returned values are way above the range of this sensor. From the datasheet, it says that this sensor is capable of measuring 400-2000ppm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.