PRODINo ESP32 Versions
Examples

In these examples you can find how to use your PRODINo ESP32 board.
PRODINo ESP32 versions tutorial...

How to start with examples


Following next steps

  1. 1
    If you don't install a board and examples library, see here...
  2. 2
    In Arduino IDE select File>Examples>ProDino_ESP32>(example name)
  3. 3
    Click over the button "Verify"
  4. 4
    Press the button "Upload" and follow procedure described here...

RS485 Echo (RS485Echo)


It works on: all devices

Prerequisites: you should connect a RS485 repeater on your RS485 board connector.

In this example a board works as repeater. If you sent data, the board collect it and sends it back to RS485 device. For this example we connect our USB RS485 Isolated Converter V3 to the board and use Hercules SETUP utility for a test software.

ProDino ESP32 RS485 echo example
ProDino ESP32 RS485 echo example

RS485 Relay (RS485Relay)


It works on: all devices

Prerequisites: you should connect a RS485 device on your RS485 board connector.

Here you can manage relay on the board through RS485 protocol. Get or set it status. With this functionality you can simple to scale your project if you needed more relays for example. We created a simple protocol:

  • FFR - Get relays status
  • FFR0000 - Set all relays to Off
  • FFR0101 - Set relay 1 and 3 to On
  • FFR1111 - Set all relays to On
  • FFRx1xx - Set only relay 2 to On, other relays keep it status
ProDino ESP32 RS485 relay manipulation example
ProDino ESP32 RS485 relay manipulation example

RS485 Input (RS485Input)


It works on: all devices

Prerequisites: you should connect a RS485 device on your RS485 board connector.

We can get statuses from isolated inputs through RS485 protocol. To the manage this we created a simple protocol:

  • FFI - Get Input status
ProDino ESP32 RS485 reads inputs example
ProDino ESP32 RS485 reads inputs example

TCP Inputs (TCPInputWE)


It works on: all devices (WiFi) but by Ethernet example only devices support Ethernet

Prerequisites: If you test WiFi you have to fill arduino_secrets.h file with credentials

This example supports two channel for communication: WiFi, Ethernet. It you have board that supports simultaneously WiFi and Ethernet you can use two channels to read data.  We can get statuses from isolated inputs through TCP protocol. To the manage this we created a simple protocol:

  • FFI - Get Input status
ProDino ESP32 TCP relay manipulation example
ProDino ESP32 TCP reads inputs example

TCP Relay (TCPRelayWE)


It works on: all devices (WiFi) but by Ethernet example only devices support Ethernet

Prerequisites: If you test WiFi you have to fill arduino_secrets.h file with credentials

It you have board that supports simultaneously WiFi and Ethernet you can use two channels to read and switch relays.  We can get/set relay statuses through TCP protocol. To the manage this we created a simple protocol:

  • FFR - Get relays status
  • FFR0000 - Set all relays to Off
  • FFR0101 - Set relay 1 and 3 to On
  • FFR1111 - Set all relays to On
  • FFRx1xx - Set only relay 2 to On, other relays keep it status
ProDino ESP32 TCP relay manipulation example
ProDino ESP32 TCP relay manipulation example

UDP Inputs (UDPInputWE)


It works on: all devices (WiFi) but by Ethernet example only devices support Ethernet

Prerequisites: If you test WiFi you have to fill arduino_secrets.h file with credentials

This example supports two channel for communication: WiFi, Ethernet. It you have board that supports simultaneously WiFi and Ethernet you can use two channels to read data.  We can get statuses from isolated inputs through UDP protocol. To the manage this we created a simple protocol:

  • FFI - Get Input status
ProDino ESP32 UDP reads inputs example
ProDino ESP32 UDP reads inputs example

UDP Relay (UDPRelayWE)


It works on: all devices (WiFi) but by Ethernet example only devices support Ethernet

Prerequisites: If you test WiFi you have to fill arduino_secrets.h file with credentials

It you have board that supports simultaneously WiFi and Ethernet you can use two channels to read and switch relays.  We can get/set relay statuses through UDP protocol. To the manage this we created a simple protocol:

  • FFR - Get relays status
  • FFR0000 - Set all relays to Off
  • FFR0101 - Set relay 1 and 3 to On
  • FFR1111 - Set all relays to On
  • FFRx1xx - Set only relay 2 to On, other relays keep it status
ProDino ESP32 UDP relay example
ProDino ESP32 UDP relay example

Web 1 Wire temperature (Web1WireWE)


It works on: all devices (WiFi) but by Ethernet example on

Prerequisites:

With this example you can read temperature from 1 Wire sensor and show it information in the WEB page.

ProDino ESP32 web 1Wire temperature example
ProDino ESP32 web 1Wire temperature example

Web DHT (WebDHTWE)


It works on: all devices (WiFi) but by Ethernet example on

Prerequisites:

  • If you test WiFi you have to fill arduino_secrets.h file with credentials.
  • Install  SimpleDHT by Winlin library for work with DHT
  • Connect DHT22 sensor to GROVE connector. Use pins GROVE_D0, VCC+, GND(-);

In this example we show how you can read and show humidity and temperature in web page. For it we use DHT22 sensor.

ProDino ESP32 web temperature DHT22 example
ProDino ESP32 web 1Wire temperature example

Web Relay (WebRelayWE)


It works on: all devices (WiFi) but by Ethernet example only devices support Ethernet

Prerequisites: If you test WiFi you have to fill arduino_secrets.h file with credentials

It you have board that supports simultaneously WiFi and Ethernet you can use two channels to read and switch relays.  We can get/set relay statuses through HTTP protocol.

ProDino ESP32 web relay example
ProDino ESP32 web relay example

Web Input (WebInputWE)


It works on: all devices (WiFi) but by Ethernet example only devices support Ethernet

Prerequisites: If you test WiFi you have to fill arduino_secrets.h file with credentials

It you have board that supports simultaneously WiFi and Ethernet you can use two channels to read optical isolated inputs.  We can get statuses through HTTP protocol.

ProDino ESP32 web input example
ProDino ESP32 web input example

All examples together (AllE) [Ethernet]


It works on: all devices that support Ethernet

Prerequisites:

  • Install  SimpleDHT by Winlin library for work with DHT
  • Connect DHT22 sensor to GROVE connector. Use pins GROVE_D0, VCC+, GND(-)

This example combine Relays, Inputs, RS485 and GROVE tests together. You can use it for creating more complex application.

ProDino ESP32 Ethernet example
ProDino ESP32 Ethernet example

All examples together (AllW) [WiFi]


It works on: all devices

Prerequisites:

  • Filling arduino_secrets.h file with credentials.
  • Install  SimpleDHT by Winlin library for work with DHT
  • Connect DHT22 sensor to GROVE connector. Use pins GROVE_D0, VCC+, GND(-)

This example combine Relays, Inputs, RS485 and GROVE tests together. In this example we use WiFi for communication.

ProDino ESP32 WiFi example
ProDino ESP32 WiFi example

All examples together (AllWE) [WiFi, Ethernet]


It works on: all devices with Ethernet

Prerequisites:

  • Filling arduino_secrets.h file with credentials.
  • Install  SimpleDHT by Winlin library for work with DHT
  • Connect DHT22 sensor to GROVE connector. Use pins GROVE_D0, VCC+, GND(-)

This example combine Relays, Inputs, RS485 and GROVE tests together. In this example we use simultaneously WiFi and Ethernet for communication.

ProDino ESP32 WiFi, Ethernet example
ProDino ESP32 WiFi, Ethernet example
ProDino ESP32 WiFi, Ethernet example

All examples together (AllWEG) [WiFi, Ethernet, GSM]


It works on: ProDino ESP32 Ethernet GSM V1

Prerequisites:

  • Filling arduino_secrets.h file with credentials.
  • Install  SimpleDHT by Winlin library for work with DHT
  • Connect DHT22 sensor to GROVE connector. Use pins GROVE_D0, VCC+, GND(-)

This example combine Blynk, Relays, Inputs, RS485 and GROVE tests together. In this example we use simultaneously GSM, WiFi and Ethernet for communication. With WiFi and Ethernet you use Web page, with Blynk you use Blynk mobile application. You have opportunity to change relay states from different communication channels as: GSM, WiFi and Ethernet.

ProDino ESP32 WiFi, Ethernet, GSM example
ProDino ESP32 WiFi, Ethernet, GSM example
ProDino ESP32 WiFi, Ethernet, GSM example
ProDino ESP32 WiFi, Ethernet, GSM example

Blynk GSM (BlynkG)


It works on: ProDino ESP32 GSM V1 and ProDino ESP32 Ethernet GSM V1

In this example we show how to communicate with ProDino ESP32 through Blynk For communication we use the GSM module.

ProDino ESP32 Blynk GSM example
ProDino ESP32 Blynk GSM example

Blynk with WiFi or Ethernet (BlynkWE)


It works on: all devices

In this example we show how to communicate with ProDino ESP32 through Blynk. This example includes WiFi or Ethernet communication. By default is set Ethernet. If you want to use WiFi in this examle you should comment line 50: // #define ETH_TEST

ProDino ESP32 Blynk WiFi and Ethernet example
ProDino ESP32 Blynk WiFi and Ethernet example

Simple Mqtt with GSM (MqttSimpleG)


It works on: ProDino ESP32 GSM v1 and ProDino ESP32 Ethernet GSM v1

PrerequisitesBefore start this example you need to install (Sketch\Include library\Menage Libraries... find ... and click Install):

  • Simple DHT by Winlin
  • PubSubClient by Nick O'Leary
  • Connect DHT22 sensor(s) to GROVE connector. Only one we use in this example: sensor GROVE_D0, Vcc+, Gnd(-);

You should have account in https://www.cloudmqtt.com/ or https://www.cloudamqp.com/ or other MQTT server (your RaspberryPI for example)

  • Filling arduino_secrets.h file with credentials.

It is so easy to manage your device form computer, tablet, mobile phone and other device with MQTT. In this example we show how to switch relays, read temperature and humidity and check inputs.

In this example we use GSM for communication with MQTT server.

Topics description
  • kmp/prodinoesp32:[] - the device publishes all data from device:
    kmp/prodinoesp32/isready:[OK]
    kmp/prodinoesp32/relay/1:[off]
    kmp/prodinoesp32/relay/2:[off]
    kmp/prodinoesp32/relay/3:[off]
    kmp/prodinoesp32/relay/4:[off]
    kmp/prodinoesp32/input/1:[off]
    kmp/prodinoesp32/input/2:[off]
    kmp/prodinoesp32/input/3:[off]
    kmp/prodinoesp32/input/4:[off]
    kmp/prodinoesp32/temperature/1[22.0]
    kmp/prodinoesp32/humidity/1[50]
  • kmp/prodinoesp32/relay/1:[] - the device publishes data per relay 1:
    kmp/prodinoesp32/relay/1:[off]
  • kmp/prodinoesp32/relay/1/set:[on] - we use this topic to set relay 1..4 status payload could be "on" or "off":
    kmp/prodinoesp32/relay/1:[on]
  • kmp/prodinoesp32/temperature:[] - the device publishes data from first temperature sensor:
    kmp/prodinoesp32/temperature/1:[22.0]
  • kmp/prodinoesp32/humidity:[] - the device publishes data from first humidity sensor:
    kmp/prodinoesp32/humidity/1:[50]

*Legend: every message includes a topic (as string) and a payload (as binary array). 

To describe them easily, we use following pattern: "topic:[payload]". If the payload is empty we use [].

ProDino ESP32 Mqtt Simple GSM example
ProDino ESP32 Mqtt Simple GSM example