-
-
Notifications
You must be signed in to change notification settings - Fork 408
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
PaxCounter plus SDS011: sleeping-mode #597
Comments
Could you post link to the discussion thread here? Thx. |
Shall I post my modifications to the library here? So someone interested can do it without waiting. |
yes, why not |
one problem remained in the usage of the SDS011-sensor with the PaxCounter-Software on the TTGO-board: the sleep/wakup-mechanism did not work, at least it did not work here for me and others reported ths too. I hope I found a solution but it needs some work (not much). Here are the 5 steps needed: #1: download the latest version of this lib: https://github.com/ricki-z/SDS011 #2: in the directory of the PaxCounter-software create a directory in the lib-directory. I named it SDS011 #3: extract the data from step#1 into this directory. Now this directory should contain 2 files: SDS011.cpp and SDS011.h #4: open the file SDS011.cpp in an editor and enter these 2 modifications:
In the file SDS011.cpp you will also find the implementation of the function wakeup(). Modify it into this form:
Save the file to disk. #5: in the PaxCounter-software you will find a file platformio.ini. In this file you will find an entry with the name lib_dep_sensors. Comment out one line by putting a semicolon in front of it. So it will look like this: In my tests it worked. The sensor was put to sleep for 30 seconds, then was started again with 30 seconds for warm-up. Then the values were read from the sensor and the sensor put to sleep-mode again. For my tests I used these lines in the file hal/ttgov21new.h :
Please try ths and report here if it works. |
During my test I used an Arduino Uno and an Arduino Mega 2560. With these boards the existing library (unmodified) worked like a charm. But I did have problems with the TTGO-board for the PaxCounter-software. In case you did not encounter these problems you do not have to apply the modifications I described. They are not needed. |
The data in the Picture ist made by TTGO Paxcounter whit modified code in the SDS011 Lib |
The only problem we have would be the runtime of the SDS! With a rest period of 30 seconds, the sensor lasts a maximum of 2 years, according to the manufacturer. expressed very carefully. Have you already successfully sent data to ttn with the Paxcounter and the SDS? Greets |
@x-RoNiN-x yes, I have sent data to TTN. I tested it with the 3 of the formats possible for PAYLOAD_ENCODER. I stopped my work when I saw the data in hex in the console of TTN. I stopped here because I do not need the further processing of the data via TTN (I need the data on the SD-card). I did this with and without the data coming from ths SDS011. |
A deep sleep mode is currently implemented, see #627 |
@x-RoNiN-x can you make PR for this patch? |
solved in v3.2.0. |
Hi,
I hope I found a solution for this problem (putting the SDS011-device into sleep-mode for 30 seconds, then waking up).
Currently there is a discussion in the forum for this library. I hope to convince the author to modify the code a bit.
I will inform you of the progress of this discussion.
The text was updated successfully, but these errors were encountered: