Let’s Build a Spirit Box

/// Simple Spirit Box Arduino Code
/// (C) Copyright Spotted: Ghosts 2024
/// If you use this code please give credit

#include <TEA5767.h>

// Delay between station change (in ms)
int PAUSE = 20;

// Time to stay on station for (in ms)
int ON_STATION = 400;

// Start Frequency
float STATION = 87.50;

// Forward (true) / Reverse (false) sweep
boolean FORWARD = true;

short minlvl = 0; //Required Signal Level (0-5=unuseable, 6-9=poor, 10-12=good, 13-14=really good, 15=excellent)

TEA5767 radio = TEA5767();

// Setup a FM only radio configuration
// with some debugging on the Serial port
void setup() {

  // open the Serial port
  Serial.begin(57600);
  Serial.println("S:G Spirit Box...");
  delay(200);

  // Initialise the Radio 
  radio.init(minlvl);

} // setup


/// Main loop
void loop() {
  
  radio.setFrequency(STATION);
  Serial.print("Station: ");
  Serial.println(STATION);

  delay(ON_STATION);

  radio.setMuted(true);
  delay(PAUSE);
  radio.setMuted(false);

  if(FORWARD) {
    STATION = STATION + 0.1;
    if(STATION > 108.00) {
      STATION = 87.50;
    }
  } else {
    STATION = STATION - 0.1;
    if(STATION < 87.50) {
      STATION = 108.00;
    }
  }
} // loop


// End.
Next Post

Quick Haunted Antique Dolls LiDAR Scan

https://youtu.be/js2pb89e6hk I was in an antique shop last year and purchased several old dolls, all ... Read more

Previous Post

The Mayan Death Whistle

The Mayan death whistle is an enigmatic artifact from the ancient Maya civilization, known for its bone-chilling ... Read more

Share: