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
Diff: main.cpp
- Revision:
- 1:d1e89afbe50c
- Parent:
- 0:005922ecb765
- Child:
- 2:29c3d03c9231
--- a/main.cpp	Wed Feb 14 10:05:03 2018 +0000
+++ b/main.cpp	Wed Feb 14 10:40:30 2018 +0000
@@ -1,4 +1,4 @@
-Rango says, hey there Conor!
+//Rango says, hey there Conor!
 
 #include "mbed.h"
 
@@ -11,51 +11,23 @@
 int local_buffer[MAX_B] = {};
 int read = 0;
 int write = 0;
-int sum = 0;
-int prev
-
-Ticker sampler;
-Timer t;
-
-void sampling() {
-    unsigned int sample = Ain.read_u16();
-    sample_buffer[write++]=sample;
-    
-    write = write%MAX_B;
-}
-
-int get_trend(int current) {
-    int trend;
-     
-    return trend;
-}
 
 void data_process() {
-    int trend = get_trend();
-    int range = max(data)-min(data);
+    
 }
 
-int filter (int x, int y) {
-    return delta*(x)+ (1-delta)*y;
-}
-
-
 int main() {
     sampler.attach(&sampling, 0.0125); //Sample at 80Hz 
-    //t.start();
-    //t.wait(0.1);
     
     while(1) {
-        //t.reset();
-        //start = t.read();
         if (write-read > MAX_B/2 || read-write > MAX_B/2) {   // |write-read| > MAX_B/2
             for(int i = 0; i < MAX_B/2; i++) {
                 local_buffer[i] =  sample_buffer[read];
                 read = (++read) % MAX_B;
             }
         }
+        
         data_process();
-        
     }
 }
 
    
