I've got some code running under Uno, but I need it running on the Atmel 1284p with MightyCore. I'm using the latest version of MightyCore from here.
Code compiles and runs fine as mentioned on the Uno, and also compiles okay for Mega. But when I change the board to the 1284p which is the chip I'm using it gives the following error.
In file included from /Volumes/Users/tsarath/Documents/My Gear/Arduino/Sketch_Files/libraries/Blynk/src/BlynkSimpleStream.h:18:0,
from /Volumes/Users/tsarath/Documents/My Gear/Arduino/Sketch_Files/WeatherBase_v15/WeatherBase_v15.ino:28:
/Volumes/Users/tsarath/Documents/My Gear/Arduino/Sketch_Files/libraries/Blynk/src/Adapters/BlynkSerial.h: In member function 'bool BlynkTransportStream::connect()':
/Volumes/Users/tsarath/Documents/My Gear/Arduino/Sketch_Files/libraries/Blynk/src/Adapters/BlynkSerial.h:37:17: error: 'class Stream' has no member named 'flush'
stream->flush();
^~~~~
exit status 1
Error compiling for board ATmega1284.
bool connect() {
BLYNK_LOG1(BLYNK_F("Connecting..."));
stream->flush(); // <---Compile error on the 1284p
return conn = true;
}
Commenting the offending line out results in successful compilation but of course the resulting function does not work.
Given the function works on the standard Arduino board cores, only thing I can think of is that Stream.cpp in MightyCore has not implemented the flush() function.
Any thoughts on how I can either work around this or substitute flush() in some other way?
It's safe to say I'm way over my head on this issue and would greatly appreciate your help. :o
Thanks, I was actually able to get my code working without the use of flush() by commenting this line out. The code was failing elsewhere originally which I misread for this error.
connect() returns true after flush(), so now it just returns true without flush(). Hopefully no serious issues further down the line...