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:799f593013e7, 2016-09-23 (annotated)
- Committer:
- flappingwing
- Date:
- Fri Sep 23 07:17:08 2016 +0000
- Revision:
- 0:799f593013e7
AnologIn demo for Nucleo F303K8
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
flappingwing | 0:799f593013e7 | 1 | #include "mbed.h" |
flappingwing | 0:799f593013e7 | 2 | |
flappingwing | 0:799f593013e7 | 3 | BusOut leds( D1,D0,D4,D5 ); |
flappingwing | 0:799f593013e7 | 4 | AnalogIn ai( A0 ); |
flappingwing | 0:799f593013e7 | 5 | |
flappingwing | 0:799f593013e7 | 6 | int main() { |
flappingwing | 0:799f593013e7 | 7 | while(1) { |
flappingwing | 0:799f593013e7 | 8 | leds = (int)(ai * 15); |
flappingwing | 0:799f593013e7 | 9 | wait( 0.01 ); |
flappingwing | 0:799f593013e7 | 10 | } |
flappingwing | 0:799f593013e7 | 11 | } |