Arduino Mega and ESP82 for IOT

Hello Folksm

I need your help please,

I am working on a sample where I want to store sensors data (DHT11) into an SD Card and then take the stored data and send them to the cloud,
and, in case of connection to the cloud is lost, the Arduino must continue to store data to the SD card and the connection gets back the arduino must send the data to the cloud from the last data the connection was lost,

Could you please help me with codes and program that would do the job?

Thank you

We can't help you with your code because you didn't post it. Please read the forum guide before you post your code so you know how to do it correctly. The forum guide will tell you what else you need give, such as your schematic and links to any components.

If you do not have any code and you want us to give it to you, well, that's not how it works here. There is a "gigs and collaborations" forum section where you can offer money for someone to write code for you.

Why do you need a Mega? Why not just use the esp8266? Many esp boards can use some of their flash memory as a file system, like an SD card but using memory that's already built-in. Wemos Mini would be my suggestion.