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:978160d93f83, 2015-08-05 (annotated)
- Committer:
- Jamess
- Date:
- Wed Aug 05 13:41:30 2015 +0000
- Revision:
- 0:978160d93f83
Criando array de classes;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Jamess | 0:978160d93f83 | 1 | #include "mbed.h" |
| Jamess | 0:978160d93f83 | 2 | #include "Signal.h" |
| Jamess | 0:978160d93f83 | 3 | |
| Jamess | 0:978160d93f83 | 4 | Serial pc(USBTX,USBRX); |
| Jamess | 0:978160d93f83 | 5 | |
| Jamess | 0:978160d93f83 | 6 | int main() { |
| Jamess | 0:978160d93f83 | 7 | |
| Jamess | 0:978160d93f83 | 8 | Signal Acc[10]; |
| Jamess | 0:978160d93f83 | 9 | |
| Jamess | 0:978160d93f83 | 10 | for(int x=0;x<10;x++){ |
| Jamess | 0:978160d93f83 | 11 | |
| Jamess | 0:978160d93f83 | 12 | Acc[x].setValue(x); |
| Jamess | 0:978160d93f83 | 13 | |
| Jamess | 0:978160d93f83 | 14 | } |
| Jamess | 0:978160d93f83 | 15 | |
| Jamess | 0:978160d93f83 | 16 | for(int y=0;y<10;y++){ |
| Jamess | 0:978160d93f83 | 17 | |
| Jamess | 0:978160d93f83 | 18 | pc.printf("%i",Acc[y].getValue()); |
| Jamess | 0:978160d93f83 | 19 | |
| Jamess | 0:978160d93f83 | 20 | } |
| Jamess | 0:978160d93f83 | 21 | |
| Jamess | 0:978160d93f83 | 22 | } |