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
- Committer:
- noutram
- Date:
- 2015-09-24
- Revision:
- 0:62279e997317
File content as of revision 0:62279e997317:
#include "mbed.h"
//Time period
#define T 0.01
//Mark-Space Ratio
#define R 0.1
//Mark and Space times
#define Tmark (R*T)
#define Tspace ((1.0-R)*T)
DigitalOut onboardLed(LED1);
DigitalOut redLED(D7);
int main() {
printf("\nWelcome to ELEC143\n");
while (1) {
redLED = 0; //Space
wait(Tspace);
redLED = 1; //Mark
wait(Tmark);
}
}