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.
serie.h
- Committer:
- nmonnier
- Date:
- 2022-02-04
- Revision:
- 13:ae981a954016
- Parent:
- 10:6f9340af7926
- Child:
- 14:5b7129157c7b
File content as of revision 13:ae981a954016:
// variables globales liées à la reception serie
int arecv = 0 ; // stockage intermediaire du char arrivé
void interrupt() // reception sur liaison serie
{ // ici on decode un exemple simple
// un 'a' met posx = 10 un 'b' met posx = 20
arecv = serie.getc();
tempo=500;
if (arecv == 'a') // c'est un 'a' qui arrive
{
entrer='a'; // affichage de 1
}
if (arecv == 'b')// c'est un 'b' qui arrive
{
entrer=arecv; // affichage de 2
}
if (arecv == 'c')// c'est un 'c' qui arrive
{
entrer=arecv; // affichage de 3
}
if (arecv == 'z')// c'est un 'z' qui arrive
{
entrer=arecv; // affichage de 0
}
return;
}
