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.
Diff: captUS.h
- Revision:
- 20:7d206773f39e
- Parent:
- 1:2fe8c402ee79
- Child:
- 21:e5f0f5abb5ae
diff -r c419033c0967 -r 7d206773f39e captUS.h --- a/captUS.h Mon Oct 12 19:17:40 2020 +0000 +++ b/captUS.h Tue Oct 20 17:53:32 2020 +0000 @@ -1,9 +1,23 @@ // Nom du fichier : captUS.h +#ifndef CAPTUS_H +#define CAPTUS_H +//#include "mbed.h" +#include "math.h" + +#define LONGUEUR_TAB 2000 +#define LARGEUR_TAB 3000 +#define _PI_ 3.14159265359 +#define THETA 60 + // extern extern float us_out[6]; extern Timer tps; extern Ticker ticker_US; +extern float* distance; + +extern bool rebooted; +extern bool wtt; // Prototypes void captUS_trig(); @@ -20,4 +34,29 @@ void echoRise5(); void echoFall5(); void echoRise6(); -void echoFall6(); \ No newline at end of file +void echoFall6(); + +/********************************** + * Création d'une fonction qui * + * convertis le temps en distance * + **********************************/ +float* convertToDistance(); + + +/******************************************** + * nous permet de placer l'origine au coins * + * de la table * + ********************************************/ +void changementBase(double* x_detect, double* y_detect); + +/******************************************* + * nous permet de détecter un obstacle * + * * + * false : personne | true : quelquechoses * + *******************************************/ +bool obstacleSpoted(float dist,double x_robot,double y_robot ,double phi, char I_theta); + + + + +#endif // CAPTUS_H \ No newline at end of file