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 Herkulex_Library_2019
Diff: Capteurs/Capteur.cpp
- Revision:
- 0:0cb11adecfc6
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Capteurs/Capteur.cpp Tue Jun 02 06:44:31 2020 +0000
@@ -0,0 +1,33 @@
+#include "Capteur.h"
+
+/////////////////////////////////////Lecture Batterie////////////////////////////
+AnalogIn Val_batterie(PC_2);
+/////////////////////////////////////Capteurs monocouleur////////////////////////
+DigitalIn monocouleur1(PC_15);
+DigitalIn monocouleur2(PC_14);
+DigitalIn monocouleur3(PB_10);
+DigitalIn monocouleur4(PC_3);
+
+short distance_moyenne;
+
+short lecture_telemetre(char numero_telemetre) // DEGUEUX MAIS FONCTIONNEL :')
+{
+ switch(numero_telemetre) {
+ case 1:
+ distance_moyenne=(short)DT1_trait_Ex;
+ break;
+
+ case 2:
+ distance_moyenne=(short)DT2_trait_Ex;
+ break;
+
+ case 3:
+ distance_moyenne=(short)DT3_trait_Ex;
+ break;
+
+ case 4:
+ distance_moyenne=(short)DT4_trait_Ex;
+ break;
+ }
+ return distance_moyenne;
+}
\ No newline at end of file