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
00001 #include "mbed.h" 00002 00003 //Time period 00004 #define T 0.01 00005 00006 //Mark-Space Ratio 00007 #define R 0.1 00008 00009 //Mark and Space times 00010 #define Tmark (R*T) 00011 #define Tspace ((1.0-R)*T) 00012 00013 DigitalOut onboardLed(LED1); 00014 DigitalOut redLED(D7); 00015 00016 int main() { 00017 printf("\nWelcome to ELEC143\n"); 00018 00019 while (1) { 00020 redLED = 0; //Space 00021 wait(Tspace); 00022 redLED = 1; //Mark 00023 wait(Tmark); 00024 } 00025 }
Generated on Sat Sep 10 2022 13:45:13 by
1.7.2