6. Why Chronosmart?
Chronosmart is born from a real demand of
CONI association in Latina:
▷ Help athletes training alone, without
losing the precision of results monitoring.
▷ Not carry bulky, wired recording tools.
▷ Keep track of past results.
6
8. How it works
Last
Microcontroller sends
the time recorded to the
Android app, which
manages the data
received and store them
to the db, after user’s
confirmation.
First
Position the proximity
sensors in the starting
and ending points of the
track.
Second
Athlete runs, the system
records, automatically
detecting departure and
arrival.
8
11. Initialization
11
#include <f401reMap.h> // Nucleo board mapping for
Arduino IDE
[...]
[...]
// Proximity sensor initialization
pinMode(triggerPort, OUTPUT);
pinMode(echoPort, INPUT);
[...]
[...]
// Proximity sensor in action (monitoring)
digitalWrite( triggerPort, LOW );
digitalWrite( triggerPort, HIGH );
delayMicroseconds( 10 );
digitalWrite( triggerPort, LOW );
long RTT = pulseIn(echoPort, HIGH ); // Round Trip Time
detected by the sensor
[...]
12. Starting point
When the runner starts the sensors detects no
more and the chronometer is initialized.
12
13. Timing
13
[...]
// Chronometer in action
baseTime = millis();
[...]
[...]
// Proximity sensor in action (monitoring)
digitalWrite( triggerPort, LOW );
digitalWrite( triggerPort, HIGH );
delayMicroseconds( 10 );
digitalWrite( triggerPort, LOW );
long RTT = pulseIn(echoPort, HIGH ); // Round Trip Time
detected by the sensor
[...]
14. Ending point
When the runner arrives at the goal line the
sensors detects and the chronometer is stopped.
14
finalTime = millis();
computedTime = finalTime - baseTime;
computedTimeSec = computedTime/1000;
I will present the interface. We use an Android app for manage the data from the Microcontroller .
The Architecture of the app is based on the backend service , using php web services and mysql db. The interface send any request to the Php service and Php will make the queries and retunrs the response to php and the web service respose with a Json object for take some information on the user, stored in the db of the users.
Looking the desing, we have a login page, where the user must register, fill the fields or can register usign a Facebook services. After that the user can go to main page, can go to «chono» function and start a session with a microcontroller. (the microcontroller stay on wait until recive the data from the Nucleo board, and ask to user if he want to add the time or he want cancel the actual session. In last page the user can see him result and check their progress. We use a grafic interface
In the first repository you can find an Android code, with readme and in the second the code of the microcontroller, with a brief on some working function and comment on the code.
Now we will see the demo in action: