Go Down

Topic: Please help with FM RDA5807 (Read 56 times) previous topic - next topic

Smartico7777

Oct 12, 2018, 12:37 pm Last Edit: Oct 12, 2018, 12:49 pm by Smartico7777
Sound is skipping after upload of this code, Anybody please help its an rda5807 fm chip with 5110 lcd display.

Code: [Select]
/////////////////////////////////////////////////////////////////////
#include <LCD5110_Basic.h>
#include <Arduino.h>
#include <Wire.h>
#include <radio.h>
#include <RDA5807M.h>

#define FIX_BAND     RADIO_BAND_FM

int tunIng = A7;
int VOL = A0;
int f;
int p;

float readTune = 0;
int readVOL = 0;

RDA5807M radio;    // Create an instance of Class for RDA5807M Chip
LCD5110 myGLCD(8, 9, 10, 11, 12);

extern uint8_t SmallFont[];

void setup() {
  // put your setup code here, to run once:


  myGLCD.InitLCD();
  myGLCD.setFont(SmallFont);
  myGLCD.print("WELCOME", CENTER, 0);
  myGLCD.print("Design By", CENTER, 6);
  myGLCD.print("S M A R T", CENTER, 24);
  delay(2000);
  myGLCD.clrScr();

  radio.init();
  radio.setMono(false);
  radio.setMute(false);
  radio.setBandFrequency(RADIO_BAND_FM, 10450);

}

void loop() {
  f = radio.getFrequency();
  p = radio.getVolume();

  readTune = analogRead(tunIng);
  readVOL = analogRead(VOL);

  readTune = map(readTune, 0, 1023, 7200, 10900);
  readVOL = map(readVOL, 0, 1023, 0, 10);

  radio.setFrequency(readTune);
  radio.setVolume(readVOL);

  myGLCD.print("WELCOME", CENTER, 0);

  myGLCD.print("FREQ:", LEFT, 8);
  myGLCD.printNumI(f / 100, CENTER, 8);

  myGLCD.print("VOL:", LEFT, 16);
  myGLCD.printNumI(p, CENTER, 16);

  delay (1000);
  myGLCD.clrScr();

}

PaulS

Quote
Anybody please help its an rda5807 fm chip with 5110 lcd display.
Post a link. If you are referring to two separate devices, the skipping is to be expected. LCDs are slow.
The art of getting good answers lies in asking good questions.

Go Up