当前位置:网站首页>Arduino+ze08-ch2o formaldehyde module, output formaldehyde content
Arduino+ze08-ch2o formaldehyde module, output formaldehyde content
2022-07-27 14:14:00 【knighthood2001】
🥰 Blog's front page :knighthood2001
Comments are welcome on thumb up ️
️ love python, Looking forward to progress and growth with you !!️
I would like to recommend a popular question brush 、 Interview job website
Catalog
ZE08-CH2O brief introduction
ZE08-CH2O The electrochemical formaldehyde module is a general-purpose module 、 Miniaturization module . Use the electrochemical principle to detect the presence of CH2O( formaldehyde ) To detect , It has good selectivity , stability . Built in temperature sensor , Temperature compensation is available ; It has both digital output and analog voltage output , Easy to use .

Pin instructions

ZE08-CH2O Data processing circuit has been integrated inside the module , Convert formaldehyde concentration signal into electrical signal , Finally, it is converted into data signals , Through serial port (UART) Send it out .

ZE08-CH2O Module adoption A serial port communication , Serial port baud rate and other parameters are as follows , The baud rate defaults to 9600, Non modifiable .
Communication is divided into active upload and question and answer , Factory default active upload , Every interval 1S Send a concentration value , Here the author mainly explains the active upload :
The instructions are as follows

The calculation formula of the obtained gas concentration is :
Gas concentration value = High gas concentration *256+ Low gas concentration
Pin connection
From above , We usually only need Use 3 foot 、4 foot 、5 Feet and 6 foot , Besides because 5 Feet are RXD(receive data) receive data , Therefore, you can also not connect


arduino Code display
Be careful : During code burning , It's better to RX and TX Unplug the cable of , Avoid burning failure
int incomingByte = 0;
int a[9] = {0};
int c = 0;
void setup() {
Serial.begin(9600);
Serial.println("START");
}
void loop() {
delay(5);
if(Serial.available() > 0){
for (int i=0; i<9; i++){
incomingByte = Serial.read();
Serial.print(i);
Serial.print("read:");
Serial.println(incomingByte);
delay(20);
a[i] = incomingByte;
// Serial.println(a[i]);
}
c = a[4]*256 + a[5];
Serial.print(" formaldehyde :");
Serial.println(c);
}
}Here we use array , Use the formula to calculate the formaldehyde value .
give the result as follows :

Write at the end
The above content is what the author is doing in the project , Find out arduino There is no ready-made code to use , So I wrote this article , If there is a mistake , Please correct me. !!
边栏推荐
- SLAM综述阅读笔记七:Visual and Visual-Inertial SLAM: State of the Art, Classification,and Experimental 2021
- 知识关联视角下金融证券知识图谱构建与相关股票发现
- Small program completion work wechat campus laundry small program graduation design finished product (2) small program function
- Wechat campus laundry applet graduation design finished product (7) Interim inspection report
- How to return to the parent directory with commands
- Windows10 installing SQL Server 2019
- The salary level of programmers in various countries is a little miserable
- C#测量工具示意图
- 次小生成树【模板】
- Chapter 3 business function development (add clues and remarks, and automatically refresh the added content)
猜你喜欢
![[idea] set to extract serialVersionUID](/img/ef/7eee4639cd4306a2a7a53d73528bbd.png)
[idea] set to extract serialVersionUID
![[training day4] sequence transformation [thinking]](/img/2f/ab1ee75a871adfa9ad443c4a4886ae.png)
[training day4] sequence transformation [thinking]

VSCode -- 创建模板文件

面试八股文之·TCP协议

机场云商sign解析

Realize the basic operations such as the establishment, insertion, deletion and search of linear tables based on C language

Recommended collection, confusing knowledge points of PMP challenge (2)

The universe has no end. Can utonmos shine the meta universe into reality?
![[training day3] reconstruction of roads [SPFA]](/img/eb/4729954bf5c6c0dc85daed9ca127f7.png)
[training day3] reconstruction of roads [SPFA]

MySQL advanced II. Logical architecture analysis
随机推荐
A Keypoint-based Global Association Network for Lane Detection
认知篇----硬件工程师的成才之路之经典
Utnet hybrid transformer for medical image segmentation
[related contents of multithreading]
printf函数缓冲区问题
Shell编程规范与变量
面向不平衡数据的电子病历自动分类研究
The universe has no end. Can utonmos shine the meta universe into reality?
windows10 安装Sql Server 2019
在灯塔工厂点亮5G,宁德时代抢先探路中国智造
Wechat campus laundry applet graduation design finished product of applet completion work (8) graduation design thesis template
Onnxruntime [reasoning framework, which users can easily use to run an onnx model]
HDU4565 So Easy!【矩阵连乘】【推导】
Is it still time to take the PMP Exam in September?
10 practical uses of NFT
井贤栋等蚂蚁集团高管不再担任阿里合伙人 确保独立决策
微策生物IPO过会:年营收12.6亿 睿泓投资与耀合医药是股东
Redis implements the browsing history module
What are the benefits of taking NPDP
SLAM综述阅读笔记六:基于图像语义的SLAM调研:移动机器人自主导航面向应用的解决方案 2020