Blog about Web Programming and Electronics
💬 👤
back Back to blog
Arduino & Electronics

How to set a fixed frequency on TEA5767 for BBC Radio 1

If you don\'t need to scan for stations and want your Arduino radio to always play the same station (e.g., in a workshop), the best solution is a "locked" frequency. The example below shows how to set the TEA5767 module to a fixed frequency for BBC Radio 1 (98.8 MHz).

Required Hardware

  1. Arduino board (Uno, Nano, or Mega)
  2. TEA5767 FM radio module
  3. Antenna (a piece of wire is enough)

Connection (I2C Protocol)

The TEA5767 uses I2C communication, so we connect it to the following pins:

TEA5767 Pin Arduino (Uno/Nano) Description
VCC 5V Power Supply
GND GND Ground
SDA A4 Data Line
SCL A5 Clock Line

Arduino Code for a Single Frequency

#include <Wire.h> // Library for I2C communication
#include <TEA5767.h> // Library for TEA5767 module

TEA5767 radio; // Create radio object
unsigned char status[5]; // Array for reading status

void setup() {
    Serial.begin(9600);
    Wire.begin(); // Initialize I2C

    radio.init(); // Initialize the module
    radio.set_frequency(98.8); // Set BBC Radio 1 (98.8 MHz)

    Serial.println("FM radio ready at 98.8 MHz"); 
}

void loop() {
    // Check signal strength every second
    if (radio.read_status(status)) { 
        int signal = radio.signal_level(status); // Signal strength
        int isStereo = radio.stereo(status); // Check stereo mode

        Serial.print("Signal Strength: ");
        Serial.print(signal);
        Serial.print(" | Stereo: ");
        Serial.println(isStereo ? "Yes" : "No");
    }
    delay(1000); 
}
back Back to blog