test header software pre-lora use
Dependencies: mbed SDFileSystem FXOS8700Q
SensorData.h@0:8190023facdb, 2019-03-13 (annotated)
- Committer:
- oliviab
- Date:
- Wed Mar 13 19:26:09 2019 +0000
- Revision:
- 0:8190023facdb
Test for header file (to check ); compiles ok;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
oliviab | 0:8190023facdb | 1 | #include "mbed.h" |
oliviab | 0:8190023facdb | 2 | #include <string> |
oliviab | 0:8190023facdb | 3 | #include "FXOS8700Q.h" |
oliviab | 0:8190023facdb | 4 | #include "SDFileSystem.h" |
oliviab | 0:8190023facdb | 5 | |
oliviab | 0:8190023facdb | 6 | //Serial s_com(UART3_tx, UART3_rx); // tx, rx read gps in |
oliviab | 0:8190023facdb | 7 | SDFileSystem sd(PTE3, PTE1, PTE2, PTE4, "sd"); // MOSI, MISO, SCK, CS |
oliviab | 0:8190023facdb | 8 | FILE *fp = fopen("/sd/myfile.txt", "w"); |
oliviab | 0:8190023facdb | 9 | I2C i2c(PTE25, PTE24); |
oliviab | 0:8190023facdb | 10 | FXOS8700QAccelerometer acc(i2c, FXOS8700CQ_SLAVE_ADDR1); //access accelerometer |
oliviab | 0:8190023facdb | 11 | FXOS8700QMagnetometer mag(i2c, FXOS8700CQ_SLAVE_ADDR1); |
oliviab | 0:8190023facdb | 12 | |
oliviab | 0:8190023facdb | 13 | char rca1[128]; |
oliviab | 0:8190023facdb | 14 | //string rca2; |
oliviab | 0:8190023facdb | 15 | string data; |
oliviab | 0:8190023facdb | 16 | |
oliviab | 0:8190023facdb | 17 | |
oliviab | 0:8190023facdb | 18 | void readData(); |
oliviab | 0:8190023facdb | 19 | void sensor_data(); |
oliviab | 0:8190023facdb | 20 | void log_data(string data); |