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 // Example showing multiple files using the same mbed interface instances 00002 // sford 00003 // 00004 // * The interfaces we want are in interfaces.h/cpp (e.g. our digital outputs) 00005 // - they are instanced in the .cpp file so they exist 00006 // - they are listed in the .h file as extern, so others can use them 00007 // * Both main and otheruser include interfaces.h, so can both use it 00008 00009 #include "mbed.h" 00010 #include "interfaces.h" 00011 #include "otheruser.h" 00012 00013 int main() { 00014 while(1) { 00015 led1 = led3 = 0; // main uses led1, defined in interfaces 00016 led2 = led4 = 1; 00017 wait(0.2); 00018 otheruser(); // otheruser uses led1, defined in interfaces 00019 wait(0.2); 00020 } 00021 }
Generated on Thu Jul 28 2022 02:56:28 by
1.7.2