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:9f37872de82f, 2009-11-02 (annotated)
- Committer:
- chris
- Date:
- Mon Nov 02 12:14:51 2009 +0000
- Revision:
- 0:9f37872de82f
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| chris | 0:9f37872de82f | 1 | #include "mbed.h" |
| chris | 0:9f37872de82f | 2 | |
| chris | 0:9f37872de82f | 3 | #define rRatio 6.6355 |
| chris | 0:9f37872de82f | 4 | #define vRatio 3.3 |
| chris | 0:9f37872de82f | 5 | |
| chris | 0:9f37872de82f | 6 | Serial pc (USBTX,USBRX); |
| chris | 0:9f37872de82f | 7 | AnalogIn pot (p16); |
| chris | 0:9f37872de82f | 8 | |
| chris | 0:9f37872de82f | 9 | int main() { |
| chris | 0:9f37872de82f | 10 | while(1) { |
| chris | 0:9f37872de82f | 11 | float myval = pot * rRatio * vRatio; |
| chris | 0:9f37872de82f | 12 | pc.printf("myval = %.3f \n",myval); |
| chris | 0:9f37872de82f | 13 | wait(0.2); |
| chris | 0:9f37872de82f | 14 | } |
| chris | 0:9f37872de82f | 15 | } |
| chris | 0:9f37872de82f | 16 | |
| chris | 0:9f37872de82f | 17 |