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: main.cpp
- Revision:
- 5:ed9a4f932fcf
- Parent:
- 4:cc164ecf6a36
- Child:
- 6:81494b318e55
diff -r cc164ecf6a36 -r ed9a4f932fcf main.cpp --- a/main.cpp Sat Aug 23 09:31:01 2014 +0000 +++ b/main.cpp Sat Aug 23 09:44:15 2014 +0000 @@ -165,14 +165,18 @@ // Wait for something to be found unsigned int lastPuckDriveTime = 0; + unsigned int driveLoops = 0; while(true) { // Service the puck + puck->drive(); + driveLoops++; + + // Handle 1 second updates if ((intervalTimer.read_ms() - lastPuckDriveTime >= 1000) || (intervalTimer.read_ms() < lastPuckDriveTime)) { - //puck->drive(); lastPuckDriveTime = intervalTimer.read_ms(); - LOG_INFO("Puck Service at %u, tickers = %u\n", intervalTimer.read_ms(), serviceCount); + LOG_INFO("%u T%u L%u\n", intervalTimer.read_ms(), serviceCount, driveLoops); } continue;