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@2:c0afe99e4314, 2017-11-21 (annotated)
- Committer:
- JPP
- Date:
- Tue Nov 21 15:43:14 2017 +0000
- Revision:
- 2:c0afe99e4314
- Parent:
- 1:17420a732fe8
- Child:
- 3:1d0d5b8471a3
Version 3: tempo de 1s, lecture et affichage d'une entr?e analogique.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| JPP | 0:1c2d9c93c045 | 1 | #include "mbed.h" |
| JPP | 2:c0afe99e4314 | 2 | Serial pc(USBTX, USBRX); |
| JPP | 0:1c2d9c93c045 | 3 | DigitalOut myled(LED1); |
| JPP | 2:c0afe99e4314 | 4 | AnalogIn Ain(p20); |
| JPP | 2:c0afe99e4314 | 5 | |
| JPP | 0:1c2d9c93c045 | 6 | |
| JPP | 2:c0afe99e4314 | 7 | int main() { |
| JPP | 2:c0afe99e4314 | 8 | float ADCdata; |
| JPP | 0:1c2d9c93c045 | 9 | while(1) { |
| JPP | 0:1c2d9c93c045 | 10 | myled = 1; |
| JPP | 2:c0afe99e4314 | 11 | wait(1); |
| JPP | 0:1c2d9c93c045 | 12 | myled = 0; |
| JPP | 2:c0afe99e4314 | 13 | wait(1); |
| JPP | 2:c0afe99e4314 | 14 | ACDdata=Ain.read(); |
| JPP | 2:c0afe99e4314 | 15 | pc.print("%f\t%fV \n\r", ADCdata, ABCdata*3.3);- |
| JPP | 0:1c2d9c93c045 | 16 | } |
| JPP | 0:1c2d9c93c045 | 17 | } |