Pull request for i.a. sensor buffer template

Dependencies:   BLE_API MPU6050 mbed nRF51822

Committer:
JustinAtAlten
Date:
Thu Nov 15 15:20:46 2018 +0000
Revision:
11:8c38e284e9f7
Added readme.txt

Who changed what in which revision?

UserRevisionLine numberNew contents of line
JustinAtAlten 11:8c38e284e9f7 1 Unfortunately:
JustinAtAlten 11:8c38e284e9f7 2 Seem to experience some stability issues. Haven't discovered where they come from.
JustinAtAlten 11:8c38e284e9f7 3
JustinAtAlten 11:8c38e284e9f7 4 MeasurementBufferTemplate:
JustinAtAlten 11:8c38e284e9f7 5 Self-overwriting buffer template
JustinAtAlten 11:8c38e284e9f7 6 Uses callback to retrieve sensor values
JustinAtAlten 11:8c38e284e9f7 7 Can be used for acceloremeter as well
JustinAtAlten 11:8c38e284e9f7 8 (probably best to combine sensor values into a struct, and designate that as T_BufferType)
JustinAtAlten 11:8c38e284e9f7 9
JustinAtAlten 11:8c38e284e9f7 10 ReadIntervals:
JustinAtAlten 11:8c38e284e9f7 11 ReadIntervals is designed to reduce the number of Ticker's in the app to one.
JustinAtAlten 11:8c38e284e9f7 12 Despite their simplicity, they take up a lot of memory.
JustinAtAlten 11:8c38e284e9f7 13 ReadIntervals reuses the same ticker for whatever you need (but is less simple and requires a bit more programming).
JustinAtAlten 11:8c38e284e9f7 14
JustinAtAlten 11:8c38e284e9f7 15 IO:
JustinAtAlten 11:8c38e284e9f7 16 Decided to put together all IO things. More accessable and cleaned up Main.cpp.
JustinAtAlten 11:8c38e284e9f7 17
JustinAtAlten 11:8c38e284e9f7 18 AppTime:
JustinAtAlten 11:8c38e284e9f7 19 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)
JustinAtAlten 11:8c38e284e9f7 20
JustinAtAlten 11:8c38e284e9f7 21 If you want to use an SD card for additional buffering:
JustinAtAlten 11:8c38e284e9f7 22 Looked around a bit. Many options don't seem to work due to SEEED TINY BLE running on mbed OS 2.
JustinAtAlten 11:8c38e284e9f7 23 Found one solution that seemed promising:
JustinAtAlten 11:8c38e284e9f7 24 https://os.mbed.com/handbook/SDFileSystem
JustinAtAlten 11:8c38e284e9f7 25 http://os.mbed.com/users/mbed_official/code/SDFileSystem/
JustinAtAlten 11:8c38e284e9f7 26 needs: https://os.mbed.com/teams/mbed-official/code/FATFileSystem/pull-request/4
JustinAtAlten 11:8c38e284e9f7 27 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.
JustinAtAlten 11:8c38e284e9f7 28
JustinAtAlten 11:8c38e284e9f7 29 Temperature Bulk Service:
JustinAtAlten 11:8c38e284e9f7 30 (from 'client'/'central' point of view):
JustinAtAlten 11:8c38e284e9f7 31 Write characteristic:
JustinAtAlten 11:8c38e284e9f7 32 Data provided: time in seconds since the start of the app
JustinAtAlten 11:8c38e284e9f7 33 Provide a point from which we want to read sensor data. Sensor data is subsequent data.
JustinAtAlten 11:8c38e284e9f7 34 Read characteristic:
JustinAtAlten 11:8c38e284e9f7 35 Read bulk update, see MeasurementBufferTemplate::BulkUpdate for specific format.
JustinAtAlten 11:8c38e284e9f7 36 requestedTime: time provided through Write characteristic
JustinAtAlten 11:8c38e284e9f7 37 initialTime: time of the first sensor reading provided
JustinAtAlten 11:8c38e284e9f7 38 sensorReadingInterval: time inbetween provided sensor readings
JustinAtAlten 11:8c38e284e9f7 39 numberOfReadings: number of initialized readings in 'readings' (starting from readings[0])
JustinAtAlten 11:8c38e284e9f7 40 readings: buffer containing the sensor values that are provided to the user.
JustinAtAlten 11:8c38e284e9f7 41
JustinAtAlten 11:8c38e284e9f7 42
JustinAtAlten 11:8c38e284e9f7 43 'No linker script found':
JustinAtAlten 11:8c38e284e9f7 44 This is about the NRF51822.ld file in <project directory>/mbed/TARGET_SEEED_TINY_BLE/TOOLCHAIN_GCC_ARM
JustinAtAlten 11:8c38e284e9f7 45 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)
JustinAtAlten 11:8c38e284e9f7 46