datalogger, touch screen and splitting ino files need some direction

Hi All,

I am working on just a shell to learn programming for the mega 2560 with a sainsmart 7 inch tft.

My main sketch project is in the zip file attached as it would be too big to list here.

under logger main sketch the folder logger_main is my program which at the moment incorporates a bunch of test files into one sketch with a touch screen menu.

prgram functions so far

LOGO - flashes logo from f64mb flash chip on touch screen
SCAN - list the OneWire temp sensors on serial and screen
CAL - shows the touch screen calibration routine
SDCARD - list info about sdcard and files on serial and touch screen
sdlog - currently trying to incorporate the datalog sketch into this sketch
menu - not implemented yet
page - not implemented yet

there is a second sketch named datalog sketch in a second folder in the zip.

My questions are about how to properly split an ino into cpp and h files i have managed to do it and get them working for all the functions above which are basically the test files found for the function put into separate tabs.

First, lol is this even close to being the right way to do this? and second i cannot seem to get the datalog sketch into either a datalog.cpp and datalog.h file (prefered) or add it to the functions in the sdcard.cpp file i have already made. i have tried for hours and now its just bugging me. All the other ones i manged to figure it out but this one eludes me.

As a reference I have limited knowledge of C++ or adruino, my background is in Microchip Pic assembler programming mainly.

Thanks in advance for any advice.

touch logger sketch (18.4 KB)