Esp12e With standalone atmega328p

Hello I am working on a project and i am using atmega328p and esp12e links of both given.

Atmega 328- standalone:
ATmega328

ESP12-e
ESP12-e

First of all I can not find a good connection diagram.
And
Second will this esp12e work with the code that I had written with the help of you guyz earlier.

Third: Will it be better if I use the following library and use esp12e separate and my arduino separate and then communicate between the to transfer data to esp from atmega328.
Tzapu Library

That’s not surprising, for the same reason you don’t find many people towing a horse box with a Ferrari.
The ESP-12e needs quite a bit of additional circuitry to get it working in a stable way. You’d be better-off using a dev board rather than a bare chip.

Which code?

The Wi-Fi Manager library allows you to easily change the Wi-Fi credentials of an ESP device, which is handy if you want to move he device from place to place without having top e-flash the code, but it has nothing to do with device to device data transfer that you’re looking for.

What is it that the ATMega does that can’t be handled by a NodeMCU or ESP32?

Pete.

This code

    #define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
    #include <BlynkSimpleShieldEsp8266.h>
    #include <SimpleTimer.h>
    #include "WiFiEsp.h"
    char auth[] = "85c5fbd5a6364775b24353abab2acf97";
    char ssid[] = "PTCL-BB";
    char pass[] = "3553C8A8";

    bool Connected2Blynk = false;
    int x = 10001;
    #define ESP8266_BAUD 115200
    ESP8266 wifi(&Serial);

    SimpleTimer timer;
    int blynkConnStat;

    void setup()
    {
      Serial.begin(115200);
      delay(100);
      // Set ESP8266 baud rate
      Serial.begin(ESP8266_BAUD);
      delay(100);

      Blynk.config(wifi,auth);
      
    }

    void loop()
    {
      Serial.println ("hello");


      if (x > 10000 && blynkConnStat == 0 ){
    Serial.print("Blynk connecting");
    Blynk.connect();
    blynkConnStat = Blynk.connected();
      x=0;
      }
      
      x++;
       Blynk.run();
       Serial.print(blynkConnStat);
    }

Esp is better than atmega that i didnt thought about sorry for that.
but now I want to use esp as standalone.

I’ve fixed your code formatting by adding triple backtracks at the beginning and end.
Triple backticks look like this:
```

Please add them yourself in future otherwise your code will be deleted.
I’d also recommend that you remove your Auth code in future before posting your code. You need to regenerate the Auth code that you’re currently using otherwise others will be able to control your project.

This code wont run on a NodeMCU unless you change the libraries that are used and the code that defines your connection type. Look at the Sketch Builder for examples of ESP libraries etc.

You should really do something about that void loop too.

Pete.

My question now is how do i connect sensors that require analog pins. In my projects I use alot of sensors for example if I were to use 10 sensors using 10 analog pins how would I do it with esp32 or esp12

In practice, I find that the sensors aren’t usually in the same physical location, unless you’re doing something like monitoring temperatures on a bank of batteries.
So, you have the choice or running wires from your sensors (not a good idea with analogue signals) or having multiple devices with a small number of sensors attached to each.

My smart home currently has 19 ESP8266 devices scattered around the house. Some are built-in to devices like Sonoff switches, others have sensors attached to them, others are used to transmit IR and 433 MHz signals that control other devices such as blinds, fans and aircon.
These ESPs are located in the area where they are needed and often have just one job to do.

If you have a need to attach multiple analogue devices to one ESP, or to use more GPIO pins that are available, then the simple solution is a multiplexer to give the pins that are needed.

Pete.