change mbed file
Dependencies: SDFileSystem FXOS8700Q
Diff: SensorData.h
- Revision:
- 0:8190023facdb
- Child:
- 1:ea56355bccae
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SensorData.h Wed Mar 13 19:26:09 2019 +0000 @@ -0,0 +1,20 @@ +#include "mbed.h" +#include <string> +#include "FXOS8700Q.h" +#include "SDFileSystem.h" + +//Serial s_com(UART3_tx, UART3_rx); // tx, rx read gps in +SDFileSystem sd(PTE3, PTE1, PTE2, PTE4, "sd"); // MOSI, MISO, SCK, CS +FILE *fp = fopen("/sd/myfile.txt", "w"); +I2C i2c(PTE25, PTE24); +FXOS8700QAccelerometer acc(i2c, FXOS8700CQ_SLAVE_ADDR1); //access accelerometer +FXOS8700QMagnetometer mag(i2c, FXOS8700CQ_SLAVE_ADDR1); + +char rca1[128]; +//string rca2; +string data; + + +void readData(); +void sensor_data(); +void log_data(string data); \ No newline at end of file