-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added flags & error messages added MIT license refactor
- Loading branch information
1 parent
9478203
commit d36fddb
Showing
3 changed files
with
161 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2014-2020 Rob Tillaart | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# DHT_Simulator | ||
|
||
Arduino sketch to simulate a DHT22 | ||
|
||
## Description | ||
|
||
The DHT22 is an often used sensor and many libraries are written for it | ||
including my own DHTNEW library. To better understand the protocol and | ||
to be able to debug my library I wrote a simulator for the DHT sensors | ||
in 2014. | ||
|
||
The simulator can be used to test applications to that use a DHT sensor, | ||
e.g. to get high alarm temp or whatever. | ||
|
||
Currently the code uses two analog ports to get some value for temperature | ||
and humidity. Just connect two potmeters to play and simulate increase and | ||
decrease of the temperature and humidity. | ||
|
||
## 0.2.0 version | ||
|
||
- added flag for random generation of data | ||
- added flag for debug | ||
- explicit support ESP32 & ESP8266 | ||
- added counter # samples generated per second ==> so one sees it still runs | ||
- added error and debug messages // some commented | ||
|
||
The simulator is not tested extensively so please report bugs. | ||
|
||
## Future | ||
|
||
Idea is to use the code of the simulator in combination with a | ||
Senserion or two separate sensors (DS18B20 + ? ) to provide an | ||
accurate temperature and humidity. These could then be readable | ||
with any DHT library with the performance of a DHT (~ 5ms). | ||
(when time permits) | ||
|
||
## Operation | ||
|
||
- adjust the pins in the head of the program to meet your setup | ||
- compile, connect, run | ||
|
||
And have fun. |