Using the MBED BLE library and Nordic Puck library this is a simple scoring application using Bluetooth LE. It monitors three analog inputs and triggers on reception of a pulse on any one recording data for a short period on all three. This is then published via BLE characteristics. It's a demonstrator for a new UI dev toolkit that is under development.
Fork of Example_Puck_BLE by
Diff: SampleChannel.cpp
- Revision:
- 8:87a3708dca9c
- Parent:
- 4:cc164ecf6a36
--- a/SampleChannel.cpp Sat Aug 23 20:44:36 2014 +0000 +++ b/SampleChannel.cpp Sat Aug 23 20:50:06 2014 +0000 @@ -15,7 +15,6 @@ isCapturing = false; sampleThreshold = 100; sampleDivisor = 10; - testSampleCount = 0; sampleBaseVal = 0; } @@ -31,13 +30,6 @@ void SampleChannel::AddSample(uint16_t val) { - testSampleCount++; - if (testSampleCount == 1000) - { -// pLocalLogger->printf("%d AvgT %d, AvgW %d, low %d\n", val, GetAvgOfTriggerWindow(), GetAvgOutsideTriggerWindow(), GetLowest()); - testSampleCount = 0; - } - // If capturing add to sample buf if (isCapturing) {