Cactus Rev2 Programming


I have question about Cactus Micro Rev2. I think I should make small explanation about Cactus;

Cactus is the micro-controller unit (MCU) is Atmel ATmega32U4 and the WIFI chip is ESP8266.

My main project is reading temperature value with arduino and send this value to computer via wifi.

So my first question is: Should I program Atmega and ESP8266 seperately? I mean, I need two program. First one I need to program Atmega which read analog input and send to ESP8266.
Second, I need to program ESP8266 which read data from Atmega and send it to computer. Is it a good approach or am I in a wrong way?

My second question is: If first question answer is no, so one program for atmega will be enough then, how can i send temperature value to esp8266 then to computer?

Thank you in advance.

You need a program on the Mega. On the ESP, you will either need a program to communicate with the Mega and send the data to the PC or you will need to have the AT firmware installed on the ESP and have the Mega send AT commands (with the data) to the ESP.