I want to make a mini automated plant pot in a plastic box.
What I want to do is, use two CO2 sensors.
At first, I attached one CO2 sensor to the plastic box.
And I attached the other CO2 sensor out of the plastic box.
Then, It will show my students the difference in CO2 gas concentration.
Because the plant uses CO2 in the plastic box, the CO2 concentration will be lower than outside of the box.
I think this is a good idea for understanding photosynthesis students.
However,
I don't know how to code two other CO2 sensors at one Arduino.
I did very well at using just one CO2 sensor.
I used the attached code, but it did not work. And I don't know why.
Help me, please.
I used cm1106 co2 sensor. and use the code in the description.
And I used the code that attached.
Please help the helpers by reading and following the instructions in the "How to get the best out of this forum" post, linked at the head of every forum category.
That would include editing your post to add code tags, and adding links to the sensors.
This is from the documentation of software serial .listen()
listen()
Enables the selected SoftwareSerial object to listen. Only one SoftwareSerial object can listen at a time; data that arrives for other ports will be discarded. Any data already received is discarded during the call to listen() function (unless the given instance is already listening).
Try to complete the command/response for each instance before advancing through loop()
Serial.print("Sending mySerial_1...");
send_CMD_1();
delay(500);//time for response
mySerial_1.listen();
if (mySerial_1.isListening()) {
Serial.println("mySerial_1 is listening!");
} else {
Serial.println("mySerial_1 is not listening!");
}
//Send_CMD_1();
while(mySerial_1.available()>0) {
I am very thanks for your help. I will try what you suggested. After that, I'll leave the results. Thanks so much. You are my and my student's hero!! When I ask about some other problem again, I believe you can help me.
Hi,
Can you please post a complete circuit diagram of you project?
Include both sensors and all connections and power supply.
Make sure you note component names and pin labels for clarity?
Can you please post image(s) of your project so we can see your component layout?