Go Down

Topic: Arduino interphone with RDA5807M & KT0803 (Read 1 time) previous topic - next topic


Arduino walkie talkie /Arduino two way radio used RDA5807M & KT0803.
Please use IDE 1.5.7 to complete,or go worng.
pin 4 is indicate to transmit.

#include <Arduino.h>#include <Wire.h>#include <radio.h>#include <RDA5807M.h>#include <FMTX.h>RDA5807M radio;    // Create an instance of Class for RDA5807M ChipRADIO_INFO ri;//rssi float fm_freq =108.0;//tx freuqencyint i=0;int k=0;int ptt=3;void setup() {pinMode(ptt, INPUT);//PTTpinMode(4,OUTPUT);  i2c_init();  radio.init();   radio.setFrequency(10800);//rx frequency  radio.setVolume(5);//set volume,max=15  radio.setMono(false);  radio.setMute(false);  digitalWrite(4,LOW);  i=0;}  void loop() { if(digitalRead(ptt)==HIGH){  radio.setMute(true);  while(k==0)  {   i2c_init();  delay(200);    fmtx_set_freq(fm_freq);  digitalWrite(4,HIGH);  k=1;  }  i=1;}  delay(100); if (i==1&&digitalRead(ptt)==LOW) {  radio.setFrequency(10800);  radio.setVolume(5);  radio.setMono(false);  radio.setMute(false);  digitalWrite(4,LOW); k=i=0; }  radio.getRadioInfo(&ri);//mute control if((ri.rssi)>=7) radio.setMute(false);  else if((ri.rssi)<7) radio.setMute(true);  delay(100);}


Source here:http://www.crystalradio.cn/forum.php?mod=viewthread&tid=1690359&extra=page%3D1&mobile=2
I do as this.It's include FMTX libraly and schmatic.

Go Up