Module Overview ESP32

Florian edited this page Nov 10, 2018 · 23 revisions

Quick Overview: ESP32 Modules

WARNING: ESP32 Arduino ENV is currently in development, I will not consider using ESP32 for a production use.

The complete pinout can be found on this google sheet

Define the pins you want to use for your gateways into each 'config_XX.h`. Example so as to define the pin of your RF receiver and transmitter if you don't use the ones per defaults go to config_RF.h

Software setup

  1. Uninstall your previous arduino esp32 version (remove folders)
  2. Download the Arduino ESP32 environment note that newer versions of esp32 env doesn't work, you must take the ones linked, install it following the Instructions below :
  3. Locate your sketchbook folder; open your arduino IDE, go to file->preferences, copy the path of your sketchbook folder like this
  4. Extract the folder into "sketchbook folder"/hardware/espressif
  5. Rename the folder extracted into espressif folder arduino-esp32
  6. Then go to /hardware/arduino-esp32/tools and run: sudo python or get.exe (windows)
  7. Download the OpenMQTTGateway code with all the files and put them on a folder named OpenMQTTGateway.
  8. Copy OpenMQTTGateway/lib to "sketchbook folder"/libraries
  9. Open the file OpenMQTTGateway.ino
  10. choose board ESP32 dev module
  11. change partition scheme to minimal SPIFFS (if you don't do that you will not have enough space for your program), if your board is not caompatible with ESP32 dev module choice you can modify parameters manualy

Define your MQTT server and network parameters into the USER PARAMETERS section of the file User_config.h.

/*-------------DEFINE YOUR MQTT & NETWORK PARAMETERS BELOW----------------*/

//MQTT Parameters definition
#define mqtt_server ""
#define mqtt_user "your_username" // not compulsory only if your broker needs authentication
#define mqtt_password "your_password" // not compulsory only if your broker needs authentication
// Update these with values suitable for your network.
#ifdef ESP8266 // for nodemcu, weemos and esp8266
#define wifi_ssid "wifi_name"
#define wifi_password "password"

The values below are optional if you want to use these parameters uncomment line 158 of OpenMQTTGateway.ino.

const byte ip[] = { 192, 168, 1, 99 }; // ip adress
const byte gateway[] = { 192, 168, 1, 1 }; //ip adress
const byte dns[] = { 192, 168, 1, 1 }; //ip adress
const byte subnet[] = { 255, 255, 255, 0 }; //ip adress

Upload the sketch OpenMQTTGateway.ino to your ESP32 and open the serial monitor with a speed set to 115200. Launch or verify that your Mosquitto broker is up and running.

If the connection to Mosquitto is ok you should see on the serial monitor of the Arduino IDE connected & subscription OK.

Notice that ESP32 dev environnement is still moving and should be considered for beta usage and not production usage in my point of view.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.