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.
main.cpp@0:a13b440d4fd1, 2019-05-23 (annotated)
- Committer:
- christodoulos
- Date:
- Thu May 23 08:09:19 2019 +0000
- Revision:
- 0:a13b440d4fd1
- Child:
- 1:fd5a598caa32
Test TTL
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| christodoulos | 0:a13b440d4fd1 | 1 | #include "mbed.h" |
| christodoulos | 0:a13b440d4fd1 | 2 | AnalogIn ain(A3); |
| christodoulos | 0:a13b440d4fd1 | 3 | Serial ttl(PA_0, PA_1); |
| christodoulos | 0:a13b440d4fd1 | 4 | |
| christodoulos | 0:a13b440d4fd1 | 5 | int main() |
| christodoulos | 0:a13b440d4fd1 | 6 | { |
| christodoulos | 0:a13b440d4fd1 | 7 | |
| christodoulos | 0:a13b440d4fd1 | 8 | ttl.baud(9600); |
| christodoulos | 0:a13b440d4fd1 | 9 | float x=0; |
| christodoulos | 0:a13b440d4fd1 | 10 | |
| christodoulos | 0:a13b440d4fd1 | 11 | while(1) { |
| christodoulos | 0:a13b440d4fd1 | 12 | x=3.3*ain; //Logic level 3.3 |
| christodoulos | 0:a13b440d4fd1 | 13 | ttl.printf("%f\n", x); |
| christodoulos | 0:a13b440d4fd1 | 14 | } |
| christodoulos | 0:a13b440d4fd1 | 15 | } |