Problem using Arduino Mega and ESP8266

Hello Everyone , Im using Arduino Mega + ESP8266 + Pulse Sensor + ECG SENSOR + DS18B20 . Using ESP8266 I'll be Uploaded that Processed data to ThinkSpeak Cloud .Which Board should I get Generic ESP8266 or Arduino Mega .

If I Select Arduino Mega as My Board I get an Error saying
If I choose Mega Board then I get this error
Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Build options changed, rebuilding all
C:\Users\LENOVO\Documents\Arduino\sketch_mar28a\sketch_mar28a.ino:5:25: fatal error: ESP8266WiFi.h: No such file or directory

#include <ESP8266WiFi.h>

^

compilation terminated.

Multiple libraries were found for "OneWire.h"
Used: C:\Users\LENOVO\Documents\Arduino\libraries\OneWire
Not used: C:\Users\LENOVO\Documents\Arduino\libraries\OneWire-master
exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
And If I Select Generic ESP8266 as my Board then I get this Error
Arduino: 1.8.5 (Windows 10), Board: "Generic ESP8266 Module, 80 MHz, Flash, Disabled, ck, 26 MHz, 40MHz, DOUT (compatible), 512K (no SPIFFS), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"

Build options changed, rebuilding all
sketch_mar28a:193: error: expected constructor, destructor, or type conversion before '(' token

ISR(TIMER2_COMPA_vect) //triggered when Timer2 counts to 124

^

C:\Users\LENOVO\Documents\Arduino\sketch_mar28a\sketch_mar28a.ino: In function 'void interruptSetup()':

sketch_mar28a:143: error: 'TCCR2A' was not declared in this scope

TCCR2A = 0x02; // DISABLE PWM ON DIGITAL PINS 3 AND 11, AND GO INTO CTC MODE

^

sketch_mar28a:144: error: 'TCCR2B' was not declared in this scope

TCCR2B = 0x06; // DON'T FORCE COMPARE, 256 PRESCALER

^

sketch_mar28a:145: error: 'OCR2A' was not declared in this scope

OCR2A = 0X7C; // SET THE TOP OF THE COUNT TO 124 FOR 500Hz SAMPLE RATE

^

sketch_mar28a:146: error: 'TIMSK2' was not declared in this scope

TIMSK2 = 0x02; // ENABLE INTERRUPT ON MATCH BETWEEN TIMER2 AND OCR2A

^

C:\Users\LENOVO\Documents\Arduino\sketch_mar28a\sketch_mar28a.ino: At global scope:

sketch_mar28a:193: error: expected constructor, destructor, or type conversion before '(' token

ISR(TIMER2_COMPA_vect) //triggered when Timer2 counts to 124

^

Multiple libraries were found for "OneWire.h"
Used: C:\Users\LENOVO\Documents\Arduino\libraries\OneWire
Not used: C:\Users\LENOVO\Documents\Arduino\libraries\OneWire-master
exit status 1
expected constructor, destructor, or type conversion before '(' token

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Attaching .ino for the code Thank you

sketch_mar18a.ino (11.1 KB)

What are you doing? People are already helping you with this problem in your original thread:
http://forum.arduino.cc/index.php?topic=606616
You've already been told not to create duplicate threads, yet you just created two copies of this thread, which is a duplicate of the original one. That means you've now created at least four threads on this topic. Instead of wasting time cross posting, you would be much better off to interact with all the people who already are trying to help you in the original thread.

Duplicate posts can waste the time of the people trying to help. Someone might spend 15 minutes writing a detailed answer on this thread, without knowing that someone else already did the same in the other thread.

In the future, take some time to pick the forum section that best suits the topic of your question and then only post once to that forum section. This is basic forum etiquette, as explained in the sticky "How to use this forum - please read." post you will find at the top of every forum section. It contains a lot of other useful information. Please read it.

Duplicate topic deleted..

Thread locked.

Forum timeout looming.