411 REFERENCE · Wikibooks
Khepera III Toolbox/The Toolbox/Modules/measurement
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
The measurement module provides a common framework for all programs which solely read a sensor (or several sensors) and report the result. Programs using this module therefore accept the same command line options to specify
the interval between two measurements (-w US)
the number of measurements to be taken (-r N or just -r for continuous measurements)
whether to print the results
right after measuring (default)
at the end (-f)
not at all (-F)
Synopsis
Check out the source code of the battery program for an example.
Description
This module controls the main program flow and requires only two hook functions:
A hook function take one measurement (hook_measure)
A hook function to print one measurement (hook_print)
Furthermore, an array for storing intermediate measurement must be provided.