Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of SHT_v1 by
main.cpp@0:df1c8f2961a1, 2010-01-24 (annotated)
- Committer:
- roselea
- Date:
- Sun Jan 24 22:00:35 2010 +0000
- Revision:
- 0:df1c8f2961a1
- Child:
- 1:0dbbb4802508
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| roselea | 0:df1c8f2961a1 | 1 | // simple test for SHT temp modules |
| roselea | 0:df1c8f2961a1 | 2 | |
| roselea | 0:df1c8f2961a1 | 3 | #include "mbed.h" |
| roselea | 0:df1c8f2961a1 | 4 | |
| roselea | 0:df1c8f2961a1 | 5 | #include "SHT.h" |
| roselea | 0:df1c8f2961a1 | 6 | |
| roselea | 0:df1c8f2961a1 | 7 | SHT th1(p5,p6,SHT_high); // sclock, data |
| roselea | 0:df1c8f2961a1 | 8 | |
| roselea | 0:df1c8f2961a1 | 9 | DigitalOut led1(LED1); |
| roselea | 0:df1c8f2961a1 | 10 | |
| roselea | 0:df1c8f2961a1 | 11 | int main() { |
| roselea | 0:df1c8f2961a1 | 12 | while(1) { |
| roselea | 0:df1c8f2961a1 | 13 | th1.update(SHT_high); |
| roselea | 0:df1c8f2961a1 | 14 | printf("t:%6.2fC h:%6.2f%%\n",th1.get_temperature(),th1.get_humidity()); |
| roselea | 0:df1c8f2961a1 | 15 | led1=!led1; |
| roselea | 0:df1c8f2961a1 | 16 | wait(1); |
| roselea | 0:df1c8f2961a1 | 17 | } |
| roselea | 0:df1c8f2961a1 | 18 | |
| roselea | 0:df1c8f2961a1 | 19 | } |
| roselea | 0:df1c8f2961a1 | 20 |
