Skip to content

AdolfoRojasJ/CursoESP32

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Curso ESP32

Basic C++ Codes for Arduino IDE

ESP32

Codes for ESP32

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.

DUALMCU

Week 1:

Day 1:

Led Blink:

Basic Led blinking for 500 ms.

Led Blink v2:

Same blinking for 500 ms, but using definitions on the code.

Day 2:

UART Echo:

Delivers the same key that you are pressing on the Serial Monitor.

Knight Rider Leds:

Knight Rider Led secquence-like.

Knight Rider Secquence

UART Serial Communication:

Basic Serial communication code lines.

UART Blink Led:

Led's delay control using UART Communication.

Day 3:

Bluetooth Connection:

Communication between Bluetooth Serial Terminal Android App and the ESP32.

Button Input:

Basic button pressed counter.

Basic Interruption:

Button pressed counter using different interruption triggers.

Interruption with Led:

Blinky Led + Button counter handled by interruption.

Day 4:

PWM Led Control:

Led Brightness control using a PWM Signal.

PWM Led Control by UART:

PWM Signal control by UART Protocol.

RGB Led Control by UART:

Serial communication control for a RGB Led.

Day 5:

Basic ADC:

Using ESP32's ADC to read voltage values using a Potenciometer.

Basic ADC using conversion factor:

Same ADC Read Voltage but using a conversion calculated factor to obtain the voltage.

RGB Led Control by Bluetooth:

RGB Led Control using the Bluetooth Serial Terminal Android App

Touch Sensor

Basic Touch Sensor code for the ESP32.

Week 2:

Day 6:

Basic DAC:

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.

Basic DAC Harmonic Function and Trigonometrical Function Plotting:

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.

I2C Addres Finder:

Basic code that prints the slave's address of any i2c peripherical to the Serial Monitor.

Day 7:

WiFi Library:

Creation of a WiFi Library to handle the ESP32 as a WiFi Station.

WiFi Scanner:

Simple code that prints all the 2.4 GHz WiFi Connections available.

ESP32 WiFi Station:

Use the ESP32 to create a WiFi Station that could connect to a given WiFi Network.

Day 8:

Code by Daredliuth

WiFi Time:

Obtaining the current time via NTP Service.

Day 9:

WiFi Time V2:

Updating the Serial Print in order to change the format.

WiFi Time Client:

Basic TCP Client.

WiFi TCP Server:

Basic TCP Server.

Day 10:

Bidirectional UDP Communication:

Bidirectional UDP Communication.

UDP Led Control:

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

UDP UART Control:

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

WiFi Web Server:

Basic WiFi Local WebServer (Doesn't Actually Work).

About

Basic C++ Codes for Arduino IDE

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors