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
Fork of Chemical_Sensor_DMA by
Diff: main.cpp
- Revision:
- 3:a85b742be262
- Parent:
- 2:3771b3195c7b
- Child:
- 4:9fd291254686
--- a/main.cpp Thu Oct 29 17:15:20 2015 +0000 +++ b/main.cpp Sat Oct 31 20:06:37 2015 +0000 @@ -35,6 +35,7 @@ #include "AngleEncoder.h" #include "MotorControl.h" +#include "SignalProcessing.h" // for debug purposes Serial pc(USBTX, USBRX); DigitalOut led_red(LED_RED); @@ -64,11 +65,25 @@ Timer t1; using namespace std; -int main() { - +int main() +{ led_blue = 1; led_green = 1; led_red = 1; + pre_compute_tables(); + printf("STARTING\n\r"); + t1.reset(); + for (int t = 0; t<500000; t++) + { + int input1 = 5000*cos(3.14159265359 * 2*10000*t*.00001)+2500; + int input2 = 2500*sin(3.14159265359 * 2*10000*t*.00001)+2500; + t1.start(); + filter100K(input1, input2); + t1.stop(); + } + printf("FINAL TIME: %f\n\r",t1.read()); + /* + pc.baud(230400); pc.printf("Starting...\r\n"); @@ -121,6 +136,7 @@ t1.reset(); } } +*/ // while(1) { // if(pc.readable() > 0) { // char temp = pc.getc(); @@ -307,6 +323,7 @@ // } // } // } + } void output_data()