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 AnalogIn_HelloWorld by
main.cpp@6:a78d4d502f81, 2018-12-17 (annotated)
- Committer:
- isshikiyuya
- Date:
- Mon Dec 17 05:33:55 2018 +0000
- Revision:
- 6:a78d4d502f81
- Parent:
- 5:c22a0111045b
a
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| isshikiyuya | 6:a78d4d502f81 | 1 | |
| sam_grove | 0:101a12a915c6 | 2 | #include "mbed.h" |
| sam_grove | 0:101a12a915c6 | 3 | |
| isshikiyuya | 5:c22a0111045b | 4 | AnalogIn ain1(A3); |
| isshikiyuya | 5:c22a0111045b | 5 | AnalogIn ain2(A4); |
| isshikiyuya | 6:a78d4d502f81 | 6 | AnalogIn ain3(A6); |
| sam_grove | 0:101a12a915c6 | 7 | |
| sam_grove | 0:101a12a915c6 | 8 | int main(void) |
| sam_grove | 0:101a12a915c6 | 9 | { |
| sam_grove | 0:101a12a915c6 | 10 | while (1) { |
| isshikiyuya | 5:c22a0111045b | 11 | printf("voltage ain1: %f V\n", ain1.read()); |
| isshikiyuya | 5:c22a0111045b | 12 | printf("voltage ain2: %f V\n", ain2.read()); |
| isshikiyuya | 5:c22a0111045b | 13 | printf("voltage ain3: %f V\n\n", ain3.read()); |
| isshikiyuya | 4:e29502420eef | 14 | wait(2); |
| sam_grove | 0:101a12a915c6 | 15 | } |
| sam_grove | 0:101a12a915c6 | 16 | } |
