upm  1.5.0
Sensor/Actuator repository for libmraa (v1.8.0)
Public Member Functions

API for the HT9170 DTMF Decoder. More...

Detailed Description

This driver was developed using the DTMF (Dual-Tone Multi-Frequency) Shield by Seeed Studio*. It can decode DTMF signals presented at its audio input. It does not generate DTMF signals.

// Instantiate a DTMF decoder
upm::HT9170 dtmf(12, 11, 10, 9, 8);
// Now we just spin in a loop, upm_delaying every 100ms, checking to see
// if a digit is available. If so, we decode and print the digit,
// and continue looping.
while (shouldRun) {
if (dtmf.digitReady()) {
cout << "Got DTMF code: " << dtmf.decodeDigit() << endl;
// now spin until digitReady() goes false again
while (dtmf.digitReady())

Public Member Functions

 HT9170 (int dr, int o1, int o2, int o3, int o4)
 ~HT9170 ()
bool digitReady ()
char decodeDigit ()

Constructor & Destructor Documentation

HT9170 ( int  dr,
int  o1,
int  o2,
int  o3,
int  o4 

HT9170 constructor

drData ready pin
o1Digital pin for data output 1
o2Digital pin for data output 2
o3Digital pin for data output 3
o4Digital pin for data output 4
~HT9170 ( )

HT9170 destructor

Member Function Documentation

bool digitReady ( )

Checks to see if a DTMF number is ready to be read

True if there is a digit available to decode
char decodeDigit ( )

Decodes a digit and returns it

The documentation for this class was generated from the following files: