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.
SwitchONledBlinkss5secs.cpp
- Committer:
- goddyy
- Date:
- 2021-06-01
- Revision:
- 2:48d0e4493777
File content as of revision 2:48d0e4493777:
#include "mbed.h"
DigitalOut yellowled(p5);
DigitalIn switchbutton(p10);
int i=0;
    void Blink(){
    while(i<5){
        yellowled=0;
        wait(0.5);
        yellowled=1;
        wait(0.5);
        i++;
    }
    yellowled=0;
}   
    int main(){
        while (1){
            if(switchbutton==1)
            {
              Blink();
        }
         i=0;
         wait(0.5);
        }
    }