/ESP_Python_Serial

A tutorial on how to make an ESP and a Python script (running on PC or a RPi) communicate via Serial and do useful stuff while communicating

Primary LanguageC++

Make your ESP talk to your PC with Python via serial

This is a tutorial for how to make an ESP (no reason it won't work on an Arduino, not tested though) communicate via Serial with any PC that's running the Python script provided.

Watch the first YouTube video: Python to ESP32 communication via serial [Part 1] - Getting started

Watch the second YouTube video: Python to ESP32 communication via serial [Part 2] - Useful application


The final application (explained in part 2) is a blinking LED (of course) that:

  • By default: blinks each 1 second
  • If receives "bxxxx": Updates the blinking to xxxx
  • If receives "oxxxx": LED ON for xxxx then return to blinking
  • If receives "fxxxx": LED OFF for xxxx then return to blinking
  • If receives "h----": The system Halts forever

The code isn't meant to be the most professional or the most thought out, it's just for demo purposes.