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:
- EISR
- Date:
- 2020-02-06
- Revision:
- 1:13af94a28e0d
- Parent:
- 0:9e8a54e32f30
File content as of revision 1:13af94a28e0d:
#include "mbed.h" #include "math.h" #include "bluetoothV2bibli.h" DigitalOut myled(LED1); //led de test void data_on_blueth(void); //fonction d'interruption int main(void) { Ticker timer; //ticker pour gérer la frequence d'appelle d'une fonction init_blueth(); //initialisation avec ISR de reception et premier message myled=1; timer.attach(&data_on_blueth,0.005); // permet d'appeler formatTrameT qui gère l'ISR de transmission while(1) { if(get_val_pc(30) == 1024)myled=!myled; //Test en reception } } void data_on_blueth(void) //fonction de test pour appeler formatTrameT { static short i = 0; short reg[4]={30,45,60,75}; formatTrameT(reg[i], 500000 ); // envoie du registre et de la valeur sur ce registre i++; // permet lecture du tableau pour le test if(i>3)i=0; }