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@6:6f6ae72f40c8, 2015-08-14 (annotated)
- Committer:
- julianlab
- Date:
- Fri Aug 14 16:30:31 2015 +0000
- Revision:
- 6:6f6ae72f40c8
- Parent:
- 5:6e873c38d851
Changed the PIN defines from Arduino to Morpho
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
screamer | 0:005629fe3609 | 1 | #include "mbed.h" |
screamer | 0:005629fe3609 | 2 | |
julianlab | 6:6f6ae72f40c8 | 3 | DigitalOut leds[] ={ (PA_5), (PA_6), (PA_7), (PB_6), (PC_7) }; |
screamer | 0:005629fe3609 | 4 | |
screamer | 0:005629fe3609 | 5 | int main() { |
julianlab | 5:6e873c38d851 | 6 | |
screamer | 0:005629fe3609 | 7 | while(1) { |
julianlab | 4:bcff0ab3e0a6 | 8 | |
julianlab | 5:6e873c38d851 | 9 | for (int i = 0; i < 5; i++) { |
julianlab | 5:6e873c38d851 | 10 | leds[i] = 1; // LED is ON |
julianlab | 5:6e873c38d851 | 11 | wait(0.1); // 10 ms |
julianlab | 5:6e873c38d851 | 12 | leds[i] = 0; // LED is OFF |
julianlab | 5:6e873c38d851 | 13 | wait(0.1); // 10 ms |
julianlab | 5:6e873c38d851 | 14 | } |
julianlab | 4:bcff0ab3e0a6 | 15 | |
screamer | 0:005629fe3609 | 16 | } |
julianlab | 5:6e873c38d851 | 17 | |
julianlab | 5:6e873c38d851 | 18 | } |