Prerequisites If you haven’t installed Homebrew yet, open Terminal and run: Follow the on-screen instructions to complete the installation. Step 1: Install Python and virtualenv First, ensure that Python is installed. Homebrew makes this straightforward: Next, install virtualenv and sshpass using Homebrew: Step 2: Create a Virtual Environment Choose a directory where you want to set up […]
Tag: Python
Guide to Reading CSV Data with Python
Introduction CSV (Comma Separated Values) files are commonly used for data exchange between different applications. In Python, reading information from a CSV file is quite straightforward with the built-in csv module. This article will guide you through writing Python code to read information from a CSV file using this module. Prerequisites Make sure that your Python environment […]
Now that we have an ESP32 connected to our network and running python, the next task is to connect a two switch relay and be able to control it. Eventually we will do this via MQTT, but for now a web server will be enabled on the board to allow manual control of the relay […]
In our previous post we uploaded a python script to the ESP32 to run on boot. This time we will connect the ESP32 to our wireless network. Firstly I am going to create a config.py file to store any configuration parameters we are going to use. In this case we simply have the SSID and […]
In a previous post we flashed a W32-WROOM-32 with MicroPython and successfully got to an interactive python prompt via serial. Now we will create a simple python script and upload it to the ESP32 and have it run on boot. First, lets create a really simple python script -: import time print(‘Hello world! I can […]
I have some ESP32 based boards lying around and stumbled across MicroPython, which appealed to me as I have some Python code I wanted to try and port to an ESP32 board. MicroPython supports ESP32 and any board should work, I am using an ESP32-WROOM-32. Download the firmware Download the latest version of the firmware […]