Pull request for i.a. sensor buffer template
Dependencies: BLE_API MPU6050 mbed nRF51822
readme.txt
- Committer:
- JustinAtAlten
- Date:
- 2018-11-15
- Revision:
- 11:8c38e284e9f7
File content as of revision 11:8c38e284e9f7:
Unfortunately: Seem to experience some stability issues. Haven't discovered where they come from. MeasurementBufferTemplate: Self-overwriting buffer template Uses callback to retrieve sensor values Can be used for acceloremeter as well (probably best to combine sensor values into a struct, and designate that as T_BufferType) ReadIntervals: ReadIntervals is designed to reduce the number of Ticker's in the app to one. Despite their simplicity, they take up a lot of memory. ReadIntervals reuses the same ticker for whatever you need (but is less simple and requires a bit more programming). IO: Decided to put together all IO things. More accessable and cleaned up Main.cpp. AppTime: Time since the start of the application. Expected a built-in timer, but couldn't find a working one for SEEED TINY BLE (e.g. time(NULL) == -1, always) If you want to use an SD card for additional buffering: Looked around a bit. Many options don't seem to work due to SEEED TINY BLE running on mbed OS 2. Found one solution that seemed promising: https://os.mbed.com/handbook/SDFileSystem http://os.mbed.com/users/mbed_official/code/SDFileSystem/ needs: https://os.mbed.com/teams/mbed-official/code/FATFileSystem/pull-request/4 The SDFileSystem code needs the fix in the third link. The link says it's merged, but apparently didn't show up in my environment. Temperature Bulk Service: (from 'client'/'central' point of view): Write characteristic: Data provided: time in seconds since the start of the app Provide a point from which we want to read sensor data. Sensor data is subsequent data. Read characteristic: Read bulk update, see MeasurementBufferTemplate::BulkUpdate for specific format. requestedTime: time provided through Write characteristic initialTime: time of the first sensor reading provided sensorReadingInterval: time inbetween provided sensor readings numberOfReadings: number of initialized readings in 'readings' (starting from readings[0]) readings: buffer containing the sensor values that are provided to the user. 'No linker script found': This is about the NRF51822.ld file in <project directory>/mbed/TARGET_SEEED_TINY_BLE/TOOLCHAIN_GCC_ARM I don't recall fully, but you can get it from https://github.com/pieterm/bledemo I think (DON'T update mbed, or you'll get the same problem anyway)