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.
Dependencies: mbed
main.cpp@0:d2afa897dbc9, 2016-11-03 (annotated)
- Committer:
- Goran002
- Date:
- Thu Nov 03 19:44:29 2016 +0000
- Revision:
- 0:d2afa897dbc9
- Child:
- 1:bf24c62c6310
Izlazni napon
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Goran002 | 0:d2afa897dbc9 | 1 | #include "mbed.h" |
| Goran002 | 0:d2afa897dbc9 | 2 | int main() { |
| Goran002 | 0:d2afa897dbc9 | 3 | AnalogOut Aout(p18); |
| Goran002 | 0:d2afa897dbc9 | 4 | while(1) { |
| Goran002 | 0:d2afa897dbc9 | 5 | Aout=0.25; // 0.25*3.3V = 0.825V |
| Goran002 | 0:d2afa897dbc9 | 6 | wait(0.1); |
| Goran002 | 0:d2afa897dbc9 | 7 | Aout=0.5; // 0.5*3.3V = 1.65V |
| Goran002 | 0:d2afa897dbc9 | 8 | wait(0.1); |
| Goran002 | 0:d2afa897dbc9 | 9 | Aout=0.75; // 0.75*3.3V = 2.475V |
| Goran002 | 0:d2afa897dbc9 | 10 | wait(0.1); |
| Goran002 | 0:d2afa897dbc9 | 11 | } |
| Goran002 | 0:d2afa897dbc9 | 12 | } |