upm  0.5.1
Sensor/Actuator repository for libmraa (v0.9.1)
 All Data Structures Files Functions Variables Enumerations Enumerator Macros Groups Pages
Public Member Functions
SX6119 Class Reference

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

Detailed Description

This class implements support for the SX6119 FM Receiver. There are two digital pins: one that toggles power on/off, and the other 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 constructor

Parameters
powerPinPin to use for recording
seekPinPin to use for seeking to the next station
~SX6119 ( )

SX6119 destructor

Member Function Documentation

void togglePower ( )

Toggles the device power on or off

void seek ( )

Seeks to the next station


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