Arduino Radio Library  0.9
A set of Arduino libraries to control diverse FM radio receiver chips in Arduino projects.
Enumerations | Functions | Variables
ScanRadio.ino File Reference

This sketch implements a scanner that lists all availabe radio stations including some information. More...

#include <Wire.h>
#include <RADIO.h>
#include <RDA5807M.h>
#include <SI4703.h>
#include <SI4705.h>
#include <TEA5767.h>
#include <RDSParser.h>

Enumerations

enum  SCAN_STATE {
  STATE_START, STATE_NEWFREQ, STATE_WAITFIXED, STATE_WAITRDS,
  STATE_PRINT, STATE_END
}
 State definition for this radio implementation. More...
 

Functions

void RDS_process (uint16_t block1, uint16_t block2, uint16_t block3, uint16_t block4)
 
void runSerialCommand (char cmd, int16_t value)
 
void setup ()
 Setup a FM only radio configuration with I/O for commands and debugging on the Serial port. More...
 
void loop ()
 Constantly check for serial input commands and trigger command execution. More...
 

Variables

SCAN_STATE state
 The state variable is used for parsing input characters. More...
 

Detailed Description

This sketch implements a scanner that lists all availabe radio stations including some information.

Author
Matthias Hertel, http://www.mathertel.de

This is a Arduino sketch that uses a state machine to scan through all radio stations the radio chip can detect and outputs them on the Serial interface.
Open the Serial console with 57600 baud to see current radio information and change various settings.

Wiring

The necessary wiring of the various chips are described in the Testxxx example sketches. No additional components are required because all is done through the serial interface.

More documentation and source code is available at http://www.mathertel.de/Arduino

History:

Enumeration Type Documentation

enum SCAN_STATE

State definition for this radio implementation.

The radio object has to be defined by using the class corresponding to the used chip. by uncommenting the right radio object definition.

Enumerator
STATE_START 

waiting for a new command character.

STATE_NEWFREQ 
STATE_WAITFIXED 
STATE_WAITRDS 
STATE_PRINT 
STATE_END 

executing the command.

Function Documentation

void loop ( )

Constantly check for serial input commands and trigger command execution.

void RDS_process ( uint16_t  block1,
uint16_t  block2,
uint16_t  block3,
uint16_t  block4 
)
void runSerialCommand ( char  cmd,
int16_t  value 
)

Execute a command identified by a character and an optional number. See the "?" command for available commands.

Parameters
cmdThe command character.
valueAn optional parameter for the command.
void setup ( )

Setup a FM only radio configuration with I/O for commands and debugging on the Serial port.

Variable Documentation

SCAN_STATE state

The state variable is used for parsing input characters.