pe0mgb / SI4735-Radio-ESP32-Touchscreen-Arduino

SI4735 Radio
126 stars 36 forks source link

When I compile the sketch I receive error #2

Closed TA2WK closed 4 years ago

TA2WK commented 4 years ago

I think following function needs definition before called

si4735_2.8_TFT:717:16: error: expected initializer before 'RotaryEncFreq'

void IRAM_ATTR RotaryEncFreq()

TA2WK commented 4 years ago

Solved. Wrong board selected. Currently selected ESP32 Dev board. However new compile error appeared. I have deleted other encoder libraries, but this error still persist.

C:\Users\snowb\Documents\Arduino\Projeler\SI4735-Radio-ESP32-Touchscreen-Arduino-master\si4735_2.8_TFT\si4735_2.8_TFT.ino: In function 'void setup()':

si4735_2.8_TFT:779:57: error: 'RotaryEncFreq' was not declared in this scope

attachInterrupt(digitalPinToInterrupt(ENCODER_PIN_A), RotaryEncFreq, CHANGE);

pe0mgb commented 4 years ago

Must be wrong library. Use the supplied encoder library.

Outlook voor Android downloaden

On Sun, May 31, 2020 at 6:49 PM +0200, "Snowist" notifications@github.com wrote:

Solved. Wrong board selected. Currently selected ESP32 Dev board. However new compile error appeared. I have deleted other encode libraries, but this error still persist.

C:\Users\snowb\Documents\Arduino\Projeler\SI4735-Radio-ESP32-Touchscreen-Arduino-master\si4735_2.8_TFT\si4735_2.8_TFT.ino: In function 'void setup()':

si4735_2.8_TFT:779:57: error: 'RotaryEncFreq' was not declared in this scope

attachInterrupt(digitalPinToInterrupt(ENCODER_PIN_A), RotaryEncFreq, CHANGE);

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

TA2WK commented 4 years ago

I tried to add following code in ino file, because it was missing in downloaded copy, but just realized it is available in .ino file here. I didn't understand why my download is missing this part of code. When I add this code worked fine. Well, my PR request is unnecessary. Please ignore.

//==================================== =================================================== void IRAM_ATTR RotaryEncFreq() //======================================================================================= { // rotary encoder events if (!writingEeprom){ encoderStatus = encoder.process();

if (encoderStatus)
{
  if (encoderStatus == DIR_CW)// Direction clockwise
  {
    encoderCount = 1;
  }
  else
  {
    encoderCount = -1;
  }
}

} }