This is embarrassing, but I've been building and coding Arduino apps for a long time. But I put everything (methods, I mean) all in the .ino file. I'd like to learn how to build separate .cpp and .h files for different functions, i.e., wifi and MQTT setups.
So if I create a separate mqtt_setup.cpp, do I put its library dependencies (#include's) in that file or in the .ino? And what goes into the .ino to reference the methods in the MQTT file? I imagine there'll be a Matt_setup.h file included as well? Do I declare the forward references (proper term?) to methods within the mqtt_setup.cpp in there?
Sorry if this is basic C/C++ stuff, but I haven't done it this way, ever.
Backstory: I used LCD Wizard to design the UI for a revamped dashboard app. All the associated .cpp files are separate along with their respective header files. I want to keep this arrangement for user-defined .cpp's that I develop. I don't want to bloat the .ino.
Am I making any sense?