NXPCup_Cachan / Mbed 2 deprecated S4_bluetooth_V2_bibli

Dependencies:   mbed

main.cpp

Committer:
EISR
Date:
2020-02-06
Revision:
0:9e8a54e32f30
Child:
1:13af94a28e0d

File content as of revision 0:9e8a54e32f30:

#include "mbed.h"
#include "math.h"
#include "bluetoothV2bibli.h"

DigitalOut myled(LED1);
DigitalOut myled4(LED4);

void data_on_blueth(void);                  //fonction d'interruption
int main(void)
{
    //Ticker timer;
    
    init_blueth();        
    myled=1;     
    myled4=1;             
    //timer.attach(&data_on_blueth,0.005);   // creation de l'interruption
    while(1) {
    if(get_val_pc(30) == 1024)myled=!myled;      
    }
}

void data_on_blueth(void)
{
    static short i = 0;
    short reg[4]={30,45,60,75};
    formatTrameT(reg[i], 500000 );                         //A chaque IT
    i++;
    if(i>3)i=0;
}