logo elektroda
logo elektroda
X
logo elektroda

Creating a communication project between ESP8266mod and Arduino Uno via RT,TX pins

MarioG1 693 1
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 19324696
    MarioG1
    Level 8  
    Welcome,

    As in the subject, I would like to send information from ESP8266mod to arduino uno and vice versa e.g. via RT,TX pins and SoftwareSerial library, (I want ESP8266mod board to be powered by arduino)

    I have searched the internet and it is hard to find any sensible tutorial.
    I have programmed an ESP8266mod board that connects to a router and is a server so that at the ip address of the board and endpoints it turns off or lights a diode.

    About the project:
    I want to create a project where a page containing html,js,css as it is now with this simple example with the diode is on the esp8266mod board, and the
    all the sensors are connected to the arduino and all the logic from the sensors is uploaded on it.
    For example, an endpoint or button on an html page sends (just like the simple example with the diode above ) a signal to the esp8266mod board but now instead of lighting the diode that is connected to it it sends a signal to the arduino and the arduino sends a high state to the pin where the diode is, moreover the communication is supposed to work the other way e.g. the dht11 sensor sends the temperature to the arduino and the arduino sends this to the esp8266mod board and displays it on the page.

    Is there anyone who can help me make this two-way communication?
    my ESP8266mod board:
    Creating a communication project between ESP8266mod and Arduino Uno via RT,TX pins .

    EDIT:
    I managed to do one way communication arduino --> nodemcu
    Creating a communication project between ESP8266mod and Arduino Uno via RT,TX pins .
    Do you have a problem with Arduino? Ask question. Visit our forum Arduino.
  • ADVERTISEMENT
  • #2 19393380
    endriuh28
    Level 9  
    Why not just use the ESP8266mod?
    Probably a shortage of leads?
    And why just the UART?

    I too had a similar problem and solved it with I2C communication, any way you look at it you can send whole structures with data,
    and the UART is useful for debugging both sides at once.
    I would use an ArduinoUNO instead of the Atmega itself for now.

    But in the end I blew out the ESP8266 and the Atmega and used a single ESP32 DevKitC WROOM-32U and an I2C expander PCF8574P.

    But if you absolutely want to use those two then maybe use this library from GitHub: Link .
    I recently made my library for such communication but for now one way, I have added it in the attachment.

    But I can share my code with you if you like and you can rework it for yourself?
    Attachments:
ADVERTISEMENT