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:
- hample
- Date:
- 2019-01-08
- Revision:
- 0:19ca1693f47b
File content as of revision 0:19ca1693f47b:
#include "mbed.h"
InterruptIn myinterrupt(PC9);
DigitalIn mybutton(PC10);
DigitalOut myled(LED1);
DigitalOut otherled(LED0);
Ticker myticker;
void ledToggle()
{
myled.write(!myled);
//printf("Toggle");
}
void ledToggle2()
{
otherled.write(!otherled);
}
int main()
{
myticker.attach(&ledToggle2, 2.0);
myinterrupt.fall(&ledToggle);
myinterrupt.rise(&ledToggle);
while(1){
//otherled.write(1);
//wait(1);
//otherled.write(0);
//wait(1);
}
}