upm  0.3.1
Sensor/Actuator repository for libmraa (v0.7.2)
Public Member Functions

API support for the SX6119 based Grove FM Receiver. More...

Detailed Description

This class implements support for the FM Receiver. There are two digital pins, one that toggles power on/off, and one that does a seek to the next station.

sx6119.jpg
// Instantiate a SX6119 on digital pins 2 (power) and 3 (seek)
// This example was tested on the Grove FM Receiver.
upm::SX6119* radio = new upm::SX6119(2, 3);
// if an argument was specified (any argument), seek to the next
// station, else just toggle the power.
cout << "Supply any argument to the command line to seek to the" << endl;
cout << "next station." << endl;
cout << "Running the example without an argument will toggle the" <<endl;
cout << "power on or off." << endl;
cout << endl;
bool doSeek = false;
if (argc > 1)
doSeek = true;
// depending on what was selected, do it
if (doSeek)
radio->seek();
else
radio->togglePower();

Public Member Functions

 SX6119 (int powerPin, int seekPin)
 
 ~SX6119 ()
 
void togglePower ()
 
void seek ()
 

Constructor & Destructor Documentation

SX6119 ( int  powerPin,
int  seekPin 
)

SX6119 module constructor

Parameters
powerPinthe pin to use for recording
seekPinthe pin to use to seek to the next station
~SX6119 ( )

SX6119 module Destructor

Member Function Documentation

void togglePower ( )

Toggle the device power on or off

void seek ( )

Seek to the next station


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