Jamie Satchell / Mbed OS JSatchell_SOFT253ReferredCoursework

Dependencies:   X_NUCLEO_COMMON

Fork of ReferredCoursework2016 by Stage-1 Students SoCEM

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 /*main.cpp*/
00002 #include "mbed.h"
00003 #include "x_nucleo_iks01a1.h"
00004 #include "sensor.h"
00005 #include "buffer.h"
00006 
00007 Thread sensorThread;
00008 
00009 /* Simple main function that calls the required functions*/
00010 int main() {
00011 
00012   printf("\r\n--- Starting new run ---\r\n");
00013 
00014   wait(3);
00015   
00016   sensorThread.start(sensor_run);
00017   Thread::wait(0.1);  
00018   
00019   while (1) {
00020          
00021     print_averages();     
00022     
00023     Thread::wait(0.1);
00024   }
00025 
00026 
00027 }