test cli

Dependencies:   mbed-os-example-mbed5-lorawan

Fork of Projet_de_bachelor_code by LoRa_Bachelor

Files at this revision

API Documentation at this revision

Comitter:
Ranyd04
Date:
Wed Jun 13 07:03:47 2018 +0000
Parent:
23:3dfaed332d89
Commit message:
test cli;

Changed in this revision

Sensors.cpp Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Sensors.cpp	Fri Jun 08 18:13:32 2018 +0000
+++ b/Sensors.cpp	Wed Jun 13 07:03:47 2018 +0000
@@ -20,8 +20,8 @@
             DigitalOut alim_control(PA_10);
             DigitalOut control_trans(PB_5);
             DigitalOut control_QSD(PA_9);
-            control_QSD = 1;
-            alim_control=1;
+            control_QSD = 0;
+            alim_control=0;
             control_trans=1;
             wait(2.0);
             transducteur_volt =  transducteur.read();
--- a/main.cpp	Fri Jun 08 18:13:32 2018 +0000
+++ b/main.cpp	Wed Jun 13 07:03:47 2018 +0000
@@ -107,14 +107,19 @@
 
 int courant , courant_1,courant_2 ;
 
+DigitalOut led(PA_11); 
 int tension_bat;
 
 int main (void)
 {
+
+        /*
         tension_bat = capteur.vbat_sensor();
         MSGtosend[0]=0x07;
         MSGtosend[1]=0x01;
         MSGtosend[2]= tension_bat ;   
+        */
+        
         /*
         courant = capteur.current_sensor();
         courant_1 = ((courant) & MSK1) >>0;
@@ -125,9 +130,17 @@
         MSGtosend[3]=courant_1;
         */
         
-        /*
+        
         pos = capteur.transducer_sensor();
-        
+        if(pos<1600)
+        {
+            led = 1;
+        }
+        else
+        {
+            led = 0;
+        }
+            
         pos_1 = (pos & MSK1) >>0;
         pos_2 = (pos & MSK2) >>8;
         
@@ -135,7 +148,7 @@
         MSGtosend[1]=0x02;
         MSGtosend[2]=0x00;
         MSGtosend[3]=pos;
-        */
+        
         /*
         
         QSD_value = qsd.read();