-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pins used on Wemos D1 mini (ESP8266) #8
Comments
Hello, |
And do you have a wiring example for the lolin32 and is there a sketch for lolin32 (I haven't checked myself, I'm currently trying to find my lolin32 to try it out. ) Thanks for the explanation so far! |
Use hw_get_values example. |
@strange-v MHZ19 requires 5v right. So I'll have to use a level shifter.. Or did you test this with 3v? |
It requires from 3.6 to 5.5V, but the logic pins use 3.3V as a high level (at least MH-Z19B). Check the dataset for your sensor. |
@quintendewilde have you managed to use lib on esp8266? |
No sorry I didn't figure it out. I used another library that changed the
serial to other ports and it works in that I get the ppm but not
temperature...
Interested in it I can give you the link of the github when I'm home.
Our LiB worked better on the Arduino though!
Regards Q
Op zo 18 okt. 2020 om 21:00 schreef strange_v <notifications@github.com>
…
@quintendewilde <https://github.com/quintendewilde> have you managed to
use lib on esp8266?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOARUMHRP2JINUVGPV5RXDSLM3NJANCNFSM4SLJN43A>
.
|
@quintendewilde good to now, that you managed to use your sensor. FYI, I've just tested on ESP8266 (NodeMCU ESP-12e), and everything works fine, it seems that SoftwareSerial has been improved/fixed. #include <Arduino.h>
#include <SoftwareSerial.h>
#include <MHZ19.h>
SoftwareSerial ss(13, 12); //rx, tx (D7, D6) on NodeMCU ESP-12e
MHZ19 mhz(&ss);
void setup()
{
Serial.begin(115200);
Serial.println(F("Starting..."));
ss.begin(9600);
}
void loop()
{
MHZ19_RESULT response = mhz.retrieveData();
if (response == MHZ19_RESULT_OK)
{
Serial.print(F("CO2: "));
Serial.println(mhz.getCO2());
Serial.print(F("Min CO2: "));
Serial.println(mhz.getMinCO2());
Serial.print(F("Temperature: "));
Serial.println(mhz.getTemperature());
Serial.print(F("Accuracy: "));
Serial.println(mhz.getAccuracy());
}
else
{
Serial.print(F("Error, code: "));
Serial.println(response);
}
delay(15000);
} I think this issue can be closed. |
Hi I went back for your library after all. Everything but accuracy and CO2 min works. |
What are you getting as a result of getAccuracy()? Have you seen this comment in the header file? // It isn't ready to use minimum CO2 value, additional calculations have to be applied
int getMinCO2(); PWM pin is not needed for MHZ19 library. It can be used with MHZ19PWM to read CO2 only, but this library has issues with the latest esp8266/esp32 releases. UPD |
Oops I didn't read that comment from the code. The getAccuracy() gives me 0 |
I would recommend monitoring (log to some file, database, whatever) this value for 24h or more, it will clarify whether it is changing or not. In general, accuracy and CO2 min values aren't described in the sensor's datasheet and were deducted by enthusiasts, so I wouldn't expect much here. |
Closed due to inactivity. |
Hello,
What pins need to be used to get the ppm value of the MHZ19 on a Wemos D1 mini
an alternative ESP8266 board.
I'm not sure how to wire this or do I just use the RX TX standard pins on the wemos?
The text was updated successfully, but these errors were encountered: