AnalogueInput startMonitor

18 views
Skip to first unread message

subodh

unread,
Feb 13, 2015, 12:39:43 PM2/13/15
to libbu...@googlegroups.com
Hello,
 Could you please explain how  the startMonitor work for AnalogueInput. is this interrupt driven?.  Also what is the relevance of  periodMicroSeconds .
  
Thanks in Advance

Datenheld

unread,
Feb 13, 2015, 1:55:45 PM2/13/15
to libbu...@googlegroups.com
Hi,

startMonitor is not interrupt driven. It will execute your callback every  x microseconds (periodMicroSeconds).

HTH,
Datenheld aka Bulldog

Datenheld

unread,
Feb 13, 2015, 1:57:21 PM2/13/15
to libbu...@googlegroups.com
P.S.

Here's the comment on the method from github:
/**
* Start a monitor on the analog input. It will check the
* value on the analog input periodically, as specified
* with the periodMicroSeconds argument. When the threshold
* has been reached the listener's {@link ThresholdListener#thresholdReached thresholdReached}
* method will be called.
*
* @param periodMicroSeconds the period micro seconds
* @param listener the listener
*/
void startMonitor(int periodMicroSeconds, ThresholdListener listener); https://github.com/Datenheld/Bulldog/blob/master/bulldog.core/src/main/java/org/bulldog/core/gpio/AnalogInput.java
Reply all
Reply to author
Forward
0 new messages