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.
Dependencies: mbed
main.cpp
- Committer:
- dg81
- Date:
- 2020-05-04
- Revision:
- 0:092cef4ad794
File content as of revision 0:092cef4ad794:
#include "mbed.h"
#include "string.h"
Serial pc(USBTX, USBRX,19200); // tx, rx sur les broches associées au bus USB
int err;
char command[9];
int main(void)
{
while(1)
{
if (pc.readable()){
err=pc.scanf("%s",command);
printf("la commande est : %s \n",command);
if(strcmp(command,"marche")==0) {
printf("en avant!!!\n");
}
if (strcmp(command,"arret")==0){
printf("STOP!!!");
}
}
}
}