Projet S5 Lecture de l'accelerometre avec interruption

Dependencies:   mbed PowerControl

Fork of Projet_S5 by Jonathan Tousignant

Files at this revision

API Documentation at this revision

Comitter:
trixrabbit
Date:
Sun Apr 13 18:54:06 2014 +0000
Parent:
12:16390cea4420
Child:
14:67f44035ef61
Commit message:
with power management

Changed in this revision

PowerControl.lib Show annotated file Show diff for this revision Revisions of this file
analyzer.h 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PowerControl.lib	Sun Apr 13 18:54:06 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/JST2011/code/PowerControl/#d0fa2aeb02a4
--- a/analyzer.h	Thu Apr 10 18:39:16 2014 +0000
+++ b/analyzer.h	Sun Apr 13 18:54:06 2014 +0000
@@ -20,7 +20,7 @@
  *  \def SEUIL_DETECTION
  *  \brief It's the limit for the detection
  */
-#define SEUIL_DETECTION 20
+#define SEUIL_DETECTION 15
 
 /*! 
  *  \class Analyzer analyzer.h "analyzer.h"
--- a/main.cpp	Thu Apr 10 18:39:16 2014 +0000
+++ b/main.cpp	Sun Apr 13 18:54:06 2014 +0000
@@ -3,6 +3,8 @@
 #include "interrupt.h"
 #include <iostream>
 #include <fstream>
+#include "PowerControl/PowerControl.h"
+#include "PowerControl/EthernetPowerControl.h"
 
 Serial pc(USBTX, USBRX);
 DigitalOut led1(LED1);
@@ -137,6 +139,9 @@
     string line;
     string filename = "/local/config.txt";
     
+    PHY_PowerDown(); //power down ethernet interface 175mw
+    
+    
     ifstream myfile(filename.c_str());
     
     if (myfile.is_open())
@@ -163,6 +168,7 @@
         
         while(true)
         {
+           Sleep();
         }
     }