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
- 1If you don't install a board and examples library, see here...
- 2In Arduino IDE select File>Examples>ProDino_ESP32>(example name)
- 3Click over the button "Verify"
- 4Press 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.


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:


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:


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:


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:


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:


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:


Web 1 Wire temperature (Web1WireWE)
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 1 Wire library: https://github.com/PaulStoffregen/OneWire
- Install DallasTemperature library: https://github.com/milesburton/Arduino-Temperature-Control-Library
- Connect DS18B20 sensor(s) to GROVE connector. Use pins GROVE_D0, VCC+, GND(-);
With this example you can read temperature from 1 Wire sensor and show it information in the WEB page.


Web DHT (WebDHTWE)
It works on: all devices (WiFi) but by Ethernet example on
Prerequisites:
In this example we show how you can read and show humidity and temperature in web page. For it we use DHT22 sensor.


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.


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.


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.


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.


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.



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.




Blynk GSM (BlynkG)
It works on: ProDino ESP32 GSM V1 and ProDino ESP32 Ethernet GSM V1
Prerequisites: You should follow steps from this link: https://kmpelectronics.eu/tutorials-examples/prodino-mkr-versions-examples/#tab-con-5
In this example we show how to communicate with ProDino ESP32 through Blynk For communication we use the GSM module.


Blynk with WiFi or Ethernet (BlynkWE)
It works on: all devices
Prerequisites: You should follow steps from this link: https://kmpelectronics.eu/tutorials-examples/prodino-mkr-versions-examples/#tab-con-5
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


Simple Mqtt with GSM (MqttSimpleG)
It works on: ProDino ESP32 GSM v1 and ProDino ESP32 Ethernet GSM v1
Prerequisites: Before 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 [].

