-
Notifications
You must be signed in to change notification settings - Fork 57
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
sleep() does not stop fan #6
Comments
I think that sleep() is not the problem, but communication with (to) PMS, and none commands works, I am right?
|
I choosed the Advanced.ino and changed it to use Softwareserial. The PMS7003 uart module is connected via Pins D1 and D2 at a wemos D1 Mini. So, getting the values works fine. |
You forgot to set the baud rate. I do not think it is correct: begin() require speed parameter, not pin numbers: Read this: And set proper baud rate to 9600 (PMS::BAUD_RATE). |
Sorry, I fixed the sketch. ( I removed sketch and library to test others. Therefore I had to rewrite the sketch) |
If still does't work, I recommend use another library which implement Serial functionality, like:
|
Ok, I have no time to test those libraries. Instead I use the original sketch with hardware serial. Even this does not stop the fan. The measuring and reporting works, at least I get values. |
Both libraries doesn't work with the esp8266. |
After: If it doesn't help, you can always use dedicated PMS pin:
|
I could use those separate pins but it should be possible even with the softwareserial library. It is not very special at all, therefore must be somehow a solution. I sniffed the traffic:
|
I tried the espsoftwareserial
|
So now everything works? That's good. I don't remember If I tested library with software serial implementation. My Station is online now and I can't modify it: As I suggested, read this: #5 and replace all instances:
with
just in case. This command wait for transmit all bytes. |
I will test it. But somehow the commands were changed if I used the native library. |
I use a PMS7003 and the sleep command does not stop the fan. If I short the SET pin to GND the fan stops.
The text was updated successfully, but these errors were encountered: