Arduino MEGA 2560 ESP8266 WIFI — MohanadSinan/IoT-Based-Healthcare-System Wiki

Содержание

It is a customized version of the classic ARDUINO MEGA R3 board. Full integration of Atmel ATmega2560 microcontroller and ESP8266 Wi-Fi IC, with 32 Mb (megabits) of flash memory, and CH340G USB-TTL converter on a single board!. All components can be set up to work together or independently. The convenient solution for the development of new projects requiring MEGA and WIFI Via USB you can update sketches and firmware for ATmega2560 and for ESP8266. For this onboard have the USB-serial converter CH340G.

Note: The CH340G Driver for Windows can be found at the bottom of the page

How to use Arduino Board

The board has DIP-switch, to connect the modules. There are 6 modus:

  • USB -ATmega2560: CH340 connect to ATmega2560 to upload sketch to ATmega2560
  • USB-ESP8266 (upload sketch) : CH340 connect to ESP8266 to update firmware or upload sketch to ESP8266
  • USB-ESP8266 (communication): CH340 connect to ESP8266 for serial communication
  • ATmega2560-ESP8266: Both chips can work together (after you upload the sketch)
  • USB — ATmega2560- ESP8266: CH340 connect to Mega2560 COM3 connect to ESP8266 for getting Serial output when both chips working together
  • All independent: Both chips working but not connected

Switch Status and Mode Selection:

1 2 3 4 5 6 7 8
ATmega2560-ESP8266 ON ON OFF OFF OFF OFF OFF NoUSE
USB -ATmega2560 OFF OFF ON ON OFF OFF OFF NoUSE
USB-ESP8266 (upload sketch) OFF OFF OFF OFF ON ON ON NoUSE
USB-ESP8266 (communication) OFF OFF OFF OFF ON ON OFF NoUSE
USB -ATmega2560-ESP8266 ON ON ON ON OFF OFF OFF NoUSE
All independent OFF OFF OFF OFF OFF OFF OFF NoUSE

Note 1: USB converter CH340G connect to RX0/TX0 of ATmega2560

Note 2: ESP8266 connect to RX3/TX3 of ATmega2560

Also, have switch for change of connecting port between ATmega2560 and ESP8266

After choosing the mode of the board can proceed to set up the IDE

It is important that when the ESP8266 module is programming, it is necessary to press the button “Mode”

To begin open the Arduino IDE programming environment and go to settings

Then in the window that appears in the row, Additional Boards Manager URLs (marked in red) insert http://arduino.esp8266.com/stable/package_esp8266com_index.json link for installation in Arduino IDE additional scripts that would work with the modules ESP8266 and click OK

Then go to the Tools Board Boards Manager

In the window that appears, scroll through the list down to the script esp8266 by ESP8266 Community and click.

In the lower right corner will be able to select the version of the software, select the version 2.1.0 (the newest) and click the Install button

After installation, close the window and go to Tools Board and see the list of available devices on the chip programming ESP8266

Next, you need to select the card as shown in the picture (Generic ESP8266 module)

Select the upload speed — 115200

Test sketch for ATmega2560

AT Firmware Installation

If you want to use ESP8266 in AT mode, download the PDF file. You should now configure the card so that the ESP8266 is connected to the USB and in recording mode. To do this, set switches 5, 6, and 7 to ON (left) and all other switches to OFF (right).


Источник: github-wiki-see.page