-
Notifications
You must be signed in to change notification settings - Fork 21
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
General docs/usage #3
Comments
Hi - thx for the greate library - have moved over to your library because auf time.h - incompatibilities of the alternative. Note 1) ESP-Serial issueThe following code works and is flexible for alternative pins HarwareSerial pmsSerial(2);
SerialPM pms(PMSx003, pmsSerial);
[...]
setup(){
[...]
pmsSerial.begin(9600, SERIAL_8N1, 16, 17)
} Note 2) SleepIn #2 you mention an workaround by editing the library with void SerialPM::sleep() {
trigRead(slp,msgLen); // sleep
}
void SerialPM::wake() {
trigRead(wak,msgLen); // sleep
} but trigRead() has as fare as I can see no parameters. Perhaps you have to add: void SerialPM::wake() {
uart->write(wak, msgLen); // wakeup
uart->flush();
delay(max_wait_ms * 2);
while (uart->available())
{
uart->read(); // empty the RX buffer
}
} Perhaps you can include this function in the standard library or add this option in issue 2. Thanks for your work and congratulation for the efficient lines :-) |
Hi @SFeli Thanks fort taking an interest on my library.
I think that this use case was addressed on #7. This library uses Serial1 on the ESP32 to connect a PM sensor on user defined pins. Probably the explanation is not clear enough. |
This code snippet is not mine, It was part of an attempt by a library user to implement sleep. Do you need/want sleep/wake modes? |
Can we have some more documentation around how to setup and steps to use this code? |
In addition to the examples?
I have not used the Arduino IDE on years, back on the days before the Library Manager, so I do not know how to add libraries to the IDE. In any case, I think there are plenty of tutorials that teach how to do it, e.g.:
I think I could add some links to the library README. Please let me know if you have a better idea.
I included links to the datasheets I could find for every supported sensors, but I guess this is not enough for a beginner. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
If you do not understand how to use the library, found an explanation confusing or you found a typo. Leave a message and will try to answer as soon as reasonable.
Thanks for helping to improve the library!
The text was updated successfully, but these errors were encountered: