soundimpact library
v0.5
Sound impact occurence counting from other cog.
|
Monitor sound impact occurrences from another cog.
IMPORTANT: This library is only for making monitoring from another cog more convenient. Your application does not need this to check the sensor's output state. For that, all you need is:
int state = input(pin);
The value of pin should be Propeller I/O connected to sensor's SIG pin. The sensor returns a 1 to state if an impact is detected, or 0 if not.
More...
#include "simpletools.h"
Go to the source code of this file.
Functions | |
int * | soundImpact_run (int pin) |
Runs the sound impact tracking process in another cog. | |
void | soundImpact_end (int *processID) |
End sound impact tracking process and recovers cog and stack memory for other purposes. | |
int | soundImpact_getCount (void) |
Get number of impacts since last call to soundImpact_getCount. |
Monitor sound impact occurrences from another cog.
IMPORTANT: This library is only for making monitoring from another cog more convenient. Your application does not need this to check the sensor's output state. For that, all you need is:
int state = input(pin);
The value of pin should be Propeller I/O connected to sensor's SIG pin. The sensor returns a 1 to state if an impact is detected, or 0 if not.
void soundImpact_end | ( | int * | processID | ) |
End sound impact tracking process and recovers cog and stack memory for other purposes.
processID | process identifier returned by soundImpact_run. |
int soundImpact_getCount | ( | void | ) |
Get number of impacts since last call to soundImpact_getCount.
int* soundImpact_run | ( | int | pin | ) |
Runs the sound impact tracking process in another cog.
pin | Propeller I/O pin connected to sound impact SIG pin. |