[HELP] ESP8266 V7 with arduino Mega2560

Hi all,
I've just got a university project. Now, I have ESP8266 V1 and ESP8266 V7 (see the picture below), Arduino Mega2560 and one ENC28J60 Ethernet module (and some other sensors).
First, I have to connect the temperature and humidity sensors to Arduino, get the data and then send the data to somewhere (cloud) on the internet, and use the smart device to read the data and control the system via internet. So, my questions are:
1/ Where can I find the tutorial for the ESP8266 module? (I've found many of the tutorials but they said that I need another 3.3V to 5V interface circuit because arduino digital signal is 5V but the ESP8266 is just 3.3V, but somewhere I still see they connect the ESP directly to arduino).
2/ Where can I find the tutorial for the ENC28J60? (like code explanation, from the basic, because I don't know anything about the connections, etc.. I'm really new to IoT).
3/ Please show me the start point to approach with the IoT, because my knowledge about the advance Internet is really bad.

Thank you all, I really need your help!

ductruong253:
I've found many of the tutorials but they said that I need another 3.3V to 5V interface circuit because arduino digital signal is 5V but the ESP8266 is just 3.3V, but somewhere I still see they connect the ESP directly to arduino

There is a lot of disagreement of whether this is necessary or not. Many people have used 5V I/O with ESP8266 without immediate problems but it's unsure whether this might cause issues in the long term. One thing's for sure, using 3.3V with ESP8266 is guaranteed to work without damaging it so the safest choice is to use the correct voltage levels. Note that this is generally only necessary for input. You can output a 3.3V signal from the ESP8266 to a 5V Arduino without fear of damaging either device. You may find it easier to use an ESP8266 shield on your Arduino, which will handle the level shifting and power supply to the ESP8266.

ductruong253:
Where can I find the tutorial for the ENC28J60?[/b] (like code explanation, from the basic, because I don't know anything about the connections, etc.. I'm really new to IoT).

Just get on Google and start searching. There's some good information and some bad information. The ability to effectively search for and evaluate information online is an essential skill for you to develop. The most popular library for the ENC28J60 with Arduino is GitHub - ntruchsess/arduino_uip: UIPEthernet: A plugin-replacement of the stock Arduino Ethernet library for ENC28J60 shields and breakout boards. Full support for persistent (streaming) TCP-connections and UDP (Client and Server each), ARP, ICMP, DHCP and DNS. Build around Adam Dunkels uIP Stack. Further developed version can be found on https://github.com/UIPEthernet/UIPEthernet. There are other options but I've successfully used that one, though I don't use ENC28J60 anymore because I much prefer W5100 or W5500 Ethernet controller chips. The great thing about the UIPEthernet library is that it has the same API as the Arduino Ethernet library. So you can use any examples you find for the Ethernet library as well as the ones provided with the UIPEthernet library. I have found some differences between the two but at least they're very similar.

ductruong253:
3/ Please show me the start point to approach with the IoT, because my knowledge about the advance Internet is really bad.

First you need a plan. There's probably no need to use both ESP8266 and ENC28J60. Ethernet will probably be a bit easier choice for your project, though the W5100 chip would make it easier still over ENC28J60.

If you do decide to use ESP8266 instead of an Ethernet solution you might also consider programming the ESP8266 directly(which you can do with the Arduino IDE after installing the esp8266 core: GitHub - esp8266/Arduino: ESP8266 core for Arduino) and not using the Arduino Mega 2560. This has the advantages of not requiring you to figure out how to interface the Mega with the ESP8266 module. The disadvantage is that some of the example code and libraries you will find will only run on a standard Arduino so you will need to search for ESP8266 specific information but quite a bit of Arduino examples/libraries will work on either. The ESP8266 is more limited on I/O(especially the ESP-01) so you would need to consider the requirements of your sensors. You may find it easier to use a standalone ESP8266 board such as the WeMos D1 Mini instead of trying to use the module.

Once you have a BOM(Bill of Materials) for your project you need to get the parts ordered right away if you're buying them from overseas because it can take a long time for shipping.

Next, forget all about IOT and learn the basics. Start working your way through the sketches included with the Arduino IDE at File > Examples. Make sure you understand what each line does before moving to the next example. Spend some time modifying the example and make sure that the behavior matches your expectations.

Once you understand the basics and are sure your Arduino is working properly start working with each component of your project individually. Pick a sensor, find a library or example code for it. Use the example sketch or write one to print the sensor value to the Serial Monitor. Do this for every component individually. Save these sketches, they can be used for testing later when you run into problems to make sure each component is still working.

Once all the parts work individually you are ready to start putting them together. You need to do this very systematically and methodically, one component at a time, testing at each step. This way when something stops working you will know what specific changes you made between the working state and the non-working state.

I really thank you for taking time to reply my questions. Somethings is still not easy for me to understand, but one again, thank you, Pert! :slight_smile: