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:
- salco
- Date:
- 2015-04-23
- Revision:
- 16:5ea4337d785f
- Parent:
- 15:91b3c572d9df
- Child:
- 19:0ac80045ba4c
File content as of revision 16:5ea4337d785f:
#include "mbed.h"
//#include "OSNAPprotocoleDefine.h"
//#include "mouvement.h"
#include "debug.h"
//#include "Concience/InstinctPrimaire.h"
#include "source/Task/TTaskCritique.h"
#include "source/Task/TTaskAlerte.h"
#include "source/Task/TTaskGeneral.h"
//------------------------------------
// Hyperterminal configuration
// 9600 bauds, 8-bit data, no parity
//------------------------------------
DigitalOut myled(LED1);
//char str [80];
DigitalIn mybutton(USER_BUTTON);
DigitalOut pinA(PA_13);
DigitalOut pinB(PA_14);
int main()
{
// int i = 1;
//pc.printf("Hello World !\n");
//pc.scanf ("%79s",str);
// string test="allo";
// pc.printf(test.c_str());
TTaskCritique taskCritique(1);
// TTaskAlerte taskAlerte(20);
// TTaskGeneral taskGeneral(40);
//////////
// Boot //
//////////
while(1) {
//taskAlerte.exec();
//taskGeneral.exec();
if (mybutton == 0) { // Button is pressed
//debug("Hello debug world");
taskCritique.exec();
/*if(myled) {
pinB=0;
pinA=1;
} else {
pinA=0;
pinB=1;
}*/
myled = !myled;
wait(1);
}
//wait(1);
}
/*if(taskCritt)
delete taskCritt;
if(taskAlert)
delete taskAlert;
if(taskGen)
delete taskGen;*/
}