combining button recording sd and FTP upload

Good Morning,

I am having an issue with combining 2 different codes i have made/edited for my project. Both codes work individually of each other. Both codes worked together with each other at one point, but not the way i wanted them too.

To begin, I am using a mega board, with an Adafruit Datalogger shield, with an Adafruit WINC1500 wifi breakout board. (among other misc things such as buttons and eventually leds)

my goal was to "duplicate" a product called "happy or not". This is a basic 4 button recording system for customer service. each button corresponds to a emotion (ecstatic, happy, upset, pist off) which is stored to the datalogger along with a timestamp. this portion works great.

I used "SURFERTIMS" FTP code designed for ethernet, and modified it for my wifi. this works great. i can upload the .txt document to the server and read it perfectly.

When i began to combine the 2 codes. i wanted the upload to run at a certain time once per day.
so i used an "IF" statement for time. however the upload continues to loop without regards to the time instead of just running once at that exact time.

my code is in the next post below since i couldnt fit it all in,(i have removed sensitive data from it.) if you can point me in the right direction i would greatly appreciate it.


_4_button_upload_to_ftp.ino (14.3 KB)

What device are you using to get the time?

What device are you using to get the time?

the adafruit datalogger has a built in RTC, everytime a button is pushed, i have it record the "emotion" and time stamp it with date and time so it can be compared to the schedule of employees as a later date

If I were you, I would start printing out what the time is that you are using as for comparison.
Use debug Serial print statements to see where you are in your sketch.