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.
Dependencies: mbed
main.cpp@0:780321a3f63a, 2014-08-16 (annotated)
- Committer:
- sam_grove
- Date:
- Sat Aug 16 00:34:43 2014 +0000
- Revision:
- 0:780321a3f63a
- Child:
- 1:f33ab12c1159
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sam_grove | 0:780321a3f63a | 1 | |
sam_grove | 0:780321a3f63a | 2 | #include "mbed.h" |
sam_grove | 0:780321a3f63a | 3 | |
sam_grove | 0:780321a3f63a | 4 | AnalogIn moisture(A0); |
sam_grove | 0:780321a3f63a | 5 | |
sam_grove | 0:780321a3f63a | 6 | int main(void) |
sam_grove | 0:780321a3f63a | 7 | { |
sam_grove | 0:780321a3f63a | 8 | float value = 0.0f; |
sam_grove | 0:780321a3f63a | 9 | |
sam_grove | 0:780321a3f63a | 10 | while(1) { |
sam_grove | 0:780321a3f63a | 11 | value = moisture; |
sam_grove | 0:780321a3f63a | 12 | printf("Moisture reading is %2.2f\n", value); |
sam_grove | 0:780321a3f63a | 13 | wait(1.0f); |
sam_grove | 0:780321a3f63a | 14 | } |
sam_grove | 0:780321a3f63a | 15 | } |