RC controller

Hello,
im currently developing universal RC controller for my family (they are building RC tanks as a hobby) on Arduino Uno.

Currently i have completed whole movement section so i wanted to add some sounds to make it real. For this purpose I have SD card reader and theres the problem.

The sound should be continuous. But after this the pulseIn value from receiver dropped significantly. For example( from 1500 to 900 and its unstable (sometimes droppes to zero);

By troubleshooting it seems to be a problem with continuous playing of sound. For troubleshooting i unplugged everything so currently is connected only SD reader( https://electropeak.com/micro-sd-tf-card-adapter-module ) and RC receiver ( Flysky FS-iA6B 6Ch 2.4GHz AFHDS 2A Receiver at Hobby Warehouse ).

RC receiver is currently only using VCC GND and one pin on Arduino.

Any help is welcomed :slight_smile:

For testing purposes the code is very simple:

#include <SD.h>
#include <TMRpcm.h>
#include <SPI.h>


TMRpcm audio;

#define SD_ChipSelectPin 2

void setup(){
  Serial.begin(9600);
  pinMode(4, INPUT);  
  audio.speakerPin=9;
  if(!SD.begin(SD_ChipSelectPin))
  {
    Serial.println("SD fail");
    return;
  }    
   audio.setVolume(2);  
audio.play("Es03.wav");
}  
void loop(){
int ch = pulseIn(4, HIGH, 30000);
  Serial.println(ch);
   
}

Could you fix your links please? Karma++ for using code tags :slight_smile:

micahfriesen:
Could you fix your links please? Karma++ for using code tags :slight_smile:

Sorry for the links :slight_smile: fixed

Unless you double-buffer the SD card data, it will indeed stop while refilling the buffer from the SD card.

Paul

Would you consider building your own transmitter using an nRF24L01+ transceiver module (and an similar receiver on the Arduino). It would completely remove the need for pulseIn() and could give you up to 32 channels of data.

...R
Simple nRF24L01+ Tutorial

You could always hand over the sound playing to a dedicated module like a DF Player or similar.

Steve

slipstick:
You could always hand over the sound playing to a dedicated module like a DF Player or similar.

Steve

Thanks will try :slight_smile:

There are some examples for Arduino engines on line if you google