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@1:44729c5f024a, 2020-07-18 (annotated)
- Committer:
- kevinsullivan
- Date:
- Sat Jul 18 10:58:42 2020 +0000
- Revision:
- 1:44729c5f024a
- Parent:
- 0:376219f61e79
- Child:
- 2:6bc37de37167
Q2.2
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| kevinsullivan | 0:376219f61e79 | 1 | #include "mbed.h" |
| kevinsullivan | 0:376219f61e79 | 2 | #include "C12832.h" |
| kevinsullivan | 0:376219f61e79 | 3 | Serial pc(USBTX, USBRX); // tx, rx |
| kevinsullivan | 0:376219f61e79 | 4 | PwmOut led1(LED1); |
| kevinsullivan | 0:376219f61e79 | 5 | AnalogIn pot1(p19); |
| kevinsullivan | 0:376219f61e79 | 6 | C12832 lcd(p5,p7,p6,p8,p11); |
| kevinsullivan | 0:376219f61e79 | 7 | int main() |
| kevinsullivan | 0:376219f61e79 | 8 | { |
| kevinsullivan | 0:376219f61e79 | 9 | while(1) { |
| kevinsullivan | 0:376219f61e79 | 10 | float t = pot1; |
| kevinsullivan | 0:376219f61e79 | 11 | led1 = pot1; |
| kevinsullivan | 0:376219f61e79 | 12 | wait(0.01); |
| kevinsullivan | 0:376219f61e79 | 13 | lcd.locate(0,0); //brings the cursor on the LCD back to the top left corner |
| kevinsullivan | 0:376219f61e79 | 14 | lcd.printf("value = %.2f\n",t); // displays the value on the LCD |
| kevinsullivan | 1:44729c5f024a | 15 | lcd.printf("value = %.2e\n",t); |
| kevinsullivan | 0:376219f61e79 | 16 | } |
| kevinsullivan | 0:376219f61e79 | 17 | } |