Basic C++ Codes for Arduino IDE
These are codes developed on the "ESP32 Programming and Wireless Conectivity" 10 days course, presented by Ulises Martin Peñuelas Rivas.
Most codes tested on a Dual-MCU Development Board by UNIT ELECTRONICS.
Basic Led blinking for 500 ms.
Same blinking for 500 ms, but using definitions on the code.
Delivers the same key that you are pressing on the Serial Monitor.
Knight Rider Led secquence-like.
Basic Serial communication code lines.
Led's delay control using UART Communication.
Communication between Bluetooth Serial Terminal Android App and the ESP32.
Basic button pressed counter.
Button pressed counter using different interruption triggers.
Blinky Led + Button counter handled by interruption.
Led Brightness control using a PWM Signal.
PWM Signal control by UART Protocol.
Serial communication control for a RGB Led.
Using ESP32's ADC to read voltage values using a Potenciometer.
Same ADC Read Voltage but using a conversion calculated factor to obtain the voltage.
RGB Led Control using the Bluetooth Serial Terminal Android App
Basic Touch Sensor code for the ESP32.
Connection between one of the ESP32's ADC to the DAC, use the Serial Plotter to watch the Graphic behavior.
Note: This Code didn't work on the Dual MCU due it doesn't have DAC Pin. Try using another ESP32 DevKit.
Connection between one of the ESP32's ADC to the DAC, including a trigonometrical and a harmonic function, use the Serial Plotter to watch the Graphic behavior.
Note: This Code didn't work on the Dual MCU due it doesn't have DAC Pin. Try using another ESP32 DevKit.
Basic code that prints the slave's address of any i2c peripherical to the Serial Monitor.
Creation of a WiFi Library to handle the ESP32 as a WiFi Station.
Simple code that prints all the 2.4 GHz WiFi Connections available.
Use the ESP32 to create a WiFi Station that could connect to a given WiFi Network.
Code by Daredliuth
Obtaining the current time via NTP Service.
Updating the Serial Print in order to change the format.
Basic TCP Client.
Basic TCP Server.
Bidirectional UDP Communication.
Control 4 Leds using UDP Connection.
Note: In order to send the UDP Message I used Termux, and then:
Note: pkg install netcat-openbsd
Note: echo "UNO" | nc -u 192.168.0.56 123 ← Example
UART Message sending by UDP Connection.
Note: In order to send the UDP Message I used Termux, and then:
Note: ifconfig (To obtain the remote IP of the phone)
Note: nc -u -l -p 60518
Basic WiFi Local WebServer (Doesn't Actually Work).


