Finished project.

Dependencies:   X_NUCLEO_COMMON

Fork of ReferredCoursework2016 by Stage-1 Students SoCEM

Committer:
J_Satchell
Date:
Thu Aug 17 02:42:30 2017 +0000
Revision:
90:38dfa3f350aa
Parent:
89:c55aa4c1187f
Child:
91:cd9fcd45ecf6
Completed project.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
J_Satchell 90:38dfa3f350aa 1 /*main.cpp*/
J_Satchell 90:38dfa3f350aa 2 #include "mbed.h"
J_Satchell 90:38dfa3f350aa 3 #include "x_nucleo_iks01a1.h"
J_Satchell 90:38dfa3f350aa 4 #include "sensor.h"
J_Satchell 90:38dfa3f350aa 5 #include "buffer.h"
J_Satchell 90:38dfa3f350aa 6
J_Satchell 90:38dfa3f350aa 7 Thread sensorThread;
J_Satchell 90:38dfa3f350aa 8
J_Satchell 90:38dfa3f350aa 9 /* Simple main function that calls the required functions*/
J_Satchell 90:38dfa3f350aa 10 int main() {
J_Satchell 90:38dfa3f350aa 11
J_Satchell 90:38dfa3f350aa 12 printf("\r\n--- Starting new run ---\r\n");
J_Satchell 90:38dfa3f350aa 13
J_Satchell 90:38dfa3f350aa 14 wait(3);
J_Satchell 90:38dfa3f350aa 15
J_Satchell 90:38dfa3f350aa 16 while (1) {
J_Satchell 90:38dfa3f350aa 17
J_Satchell 90:38dfa3f350aa 18 sensorThread.start(sensor_run);
J_Satchell 90:38dfa3f350aa 19 print_averages();
J_Satchell 90:38dfa3f350aa 20
J_Satchell 90:38dfa3f350aa 21 wait(0.1);
J_Satchell 90:38dfa3f350aa 22 }
noutram 89:c55aa4c1187f 23
noutram 89:c55aa4c1187f 24
noutram 89:c55aa4c1187f 25 }