![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
DHT11 sensor test for Stage 1 Engineering at the University of York
Dependencies: DHT11 UoY-serial
main.cpp@1:acb591685a28, 2021-02-04 (annotated)
- Committer:
- ajp109
- Date:
- Thu Feb 04 17:12:01 2021 +0000
- Revision:
- 1:acb591685a28
- Parent:
- 0:77209603a6fe
- Child:
- 2:789cc1bc1adc
Initial commit (lab7)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ajp109 | 0:77209603a6fe | 1 | #include "mbed.h" |
ajp109 | 0:77209603a6fe | 2 | |
ajp109 | 1:acb591685a28 | 3 | DigitalOut green(D2); |
ajp109 | 1:acb591685a28 | 4 | DigitalOut red(D3); |
ajp109 | 1:acb591685a28 | 5 | |
ajp109 | 0:77209603a6fe | 6 | int main() |
ajp109 | 0:77209603a6fe | 7 | { |
ajp109 | 1:acb591685a28 | 8 | while (true) { |
ajp109 | 1:acb591685a28 | 9 | green = true; |
ajp109 | 1:acb591685a28 | 10 | thread_sleep_for(500); |
ajp109 | 1:acb591685a28 | 11 | green = false; |
ajp109 | 1:acb591685a28 | 12 | thread_sleep_for(2500); |
ajp109 | 1:acb591685a28 | 13 | } |
ajp109 | 0:77209603a6fe | 14 | } |