Arduino Radio Library
0.9
A set of Arduino libraries to control diverse FM radio receiver chips in Arduino projects.
|
Radio implementation using the Serial communication. More...
#include <Wire.h>
#include <RADIO.h>
#include <RDA5807M.h>
#include <SI4703.h>
#include <SI4705.h>
#include <TEA5767.h>
#include <RDSParser.h>
Enumerations | |
enum | RADIO_STATE { STATE_PARSECOMMAND, STATE_PARSEINT, STATE_EXEC, STATE_NONE = 0, STATE_PARSECOMMAND, STATE_PARSEINT, STATE_EXEC, STATE_FREQ, STATE_VOL, STATE_MONO, STATE_SMUTE, STATE_PARSECOMMAND, STATE_PARSEINT, STATE_EXEC, STATE_NONE = 0, STATE_PARSECOMMAND, STATE_PARSEINT, STATE_EXEC, STATE_FREQ, STATE_VOL, STATE_MONO, STATE_SMUTE } |
State definition for this radio implementation. More... | |
Functions | |
void | DisplayFrequency (RADIO_FREQ f) |
Update the Frequency on the LCD display. More... | |
void | DisplayServiceName (char *name) |
Update the ServiceName text on the LCD display. More... | |
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 | |
RADIO_FREQ | preset [] |
int | i_sidx = 5 |
Start at Station with index=5. More... | |
RDA5807M | radio |
Create an instance of a RDA5807 chip radio. More... | |
RDSParser | rds |
get a RDS parser More... | |
RADIO_STATE | state |
The state variable is used for parsing input characters. More... | |
Radio implementation using the Serial communication.
This is a full function radio implementation that uses a LCD display to show the current station information.
It can be used with various chips after adjusting the radio object definition.
Open the Serial console with 57600 baud to see current radio information and change various settings.
The necessary wiring of the various chips are described in the Testxxx example sketches. The boards have to be connected by using the following connections:
Arduino port | SI4703 signal | RDA5807M signal |
---|---|---|
GND (black) | GND | GND |
3.3V (red) | VCC | VCC |
5V (red) | - | - |
A5 (yellow) | SCLK | SCLK |
A4 (blue) | SDIO | SDIO |
D2 | RST | - |
More documentation and source code is available at http://www.mathertel.de/Arduino
enum RADIO_STATE |
State definition for this radio implementation.
void DisplayFrequency | ( | RADIO_FREQ | f | ) |
Update the Frequency on the LCD display.
void DisplayServiceName | ( | char * | name | ) |
Update the ServiceName text on the LCD display.
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.
cmd | The command character. |
value | An optional parameter for the command. |
void setup | ( | ) |
Setup a FM only radio configuration with I/O for commands and debugging on the Serial port.
int i_sidx = 5 |
Start at Station with index=5.
RADIO_FREQ preset[] |
RDA5807M radio |
Create an instance of a RDA5807 chip radio.
The radio object has to be defined by using the class corresponding to the used chip. by uncommenting the right radio object definition.
RDSParser rds |
get a RDS parser
RADIO_STATE state |
The state variable is used for parsing input characters.