I am working on a quite big hobby project and have got stuck, probably just by misunderstanding something.
Project outline: An Ardunino Mega is connected with a SIM900 SMS device and a ESP32/ESP8266 that serves as a gate to multiple ESP with sensors. The SMS part works fine and I have used ESP32 wth BME280 without any problems. My problem is that I can not make a working connection, hardware and software, between the Arduino and a WiFi-Gate (ESP).
What course would you recommend?
So, you want to build a communication between your Arduino and the ESP32/ESP8266?
What type of connection do you have in mind? Serial communication, or it should be wireless (via Wi-Fi)?
I need a serial connection between a Arduino and an ESP to give WiFi access for the Arduino .
I’ve found this example for communication between two Arduino boards
This should also work with the ESP32 because the Serial library is compatible. However, keep in mind that you need to set the ESP32 serial pins to TX:GPIO17 and RX:GPIO16
Let me know if this helps and if you need further help.
The solution was quite strigth forward. Just connect Serial2 on ESP32 and Serial1 on the Mega. Data is then sent and received as normal strings.
Now I have a function with a bme 280 on a ESP32 sending temperature via WiFi to another ESP which in turn sends it to an Arduino Mega. Next step will be to enlarge the system with command via SMS and perhaps a touch screen to control it. No end in sight!
BTW. In an earlier question I asked if it was possible to use both bluetoth and WiFi on the same ESP32. I have tried it out and found that just the setup uses over 90 % of the memory so it not a promising way to go.