BioRobotics Group 3 / Mbed 2 deprecated Moving-average

Dependencies:   HIDScope MODSERIAL mbed

Fork of Signal Filter by BioRobotics Group 3

main.cpp

Committer:
Peasofcake
Date:
2015-09-09
Revision:
0:c8a6e00fbdc3
Child:
1:f6110f80fa45

File content as of revision 0:c8a6e00fbdc3:

#include "mbed.h"


DigitalOut gpo(D0);
DigitalOut led(LED_GREEN);
DigitalIn button(PTA4);

const int led_on = 0;
const int led_off = 1;
const int button_pressed = 0;

int main()
{
    
    
    while (true) {
        if(button.read() == button_pressed) {
            for (int n=0; n<5 ; n++) {

                led.write(led_on);
                wait(0.5f);

                led.write(led_off);

                wait(0.5f);
           } 
        }
    }
}