I am using the mega 2560. When I just use .ino and .h files, if I use Serial, it works fine, without even using:
#include <SoftwareSerial.h>
However, when I add a .cpp file I start getting 2 errors, one is solved by adding the aforementioned include, the second one, after adding it, is :
'Serial' was not declared in this scope
I know I can declare it manually and use the RX/TX pins, but I would like to be able to use the default Serial so that I don't have to occupy more pins. Especially since it works file w/o the .cpp file. Can anyone explain to me why this happens? Is it because I specify a C++ file so the compiler changes?