In this class, we will be using an ESP32 microcontroller to collect data and control various systems (running motors, generating electrical currents, playing sounds). An ESP32 can be thought of as a mini computer which we can run programs on. Instead of running an application on a screen, the ESP32 will generate electrical currents that can run speakers, light up LEDs, and send data from various sensors back to the computer for analysis. We will be carrying out this analysis using the programming language Python. Programming is now a requirement in all STEM fields, even outside of computer science, as it is a powerful tool in any kind of analysis.
As such, for every class, you will need to bring your own laptop, and you will need to carry out the following tasks before the first class. Here, we will make sure that your laptops are compatible with the ESP32 and with our Python system. Even if you have your own ESP32 and Python distribution, please read the following instructions carefully as we will be using specific ESP32 and Python code will not be compiled locally.
As such, for every class, you will need to bring your own laptop, and you will need to carry out the following tasks before the first class. Here, we will make sure that your laptops are compatible with the ESP32 and with our Python system. Even if you have your own ESP32 and Python distribution, please read the following instructions carefully as we will be using specific ESP32 and Python code will not be compiled locally.
ESP32 Setup
You will need to purchase an ESP32 starter kit. This kit includes extra elements that will be used in the class. If you already have your own microcontroller, make sure it is an ESP32, and that you have a full set of all of the elements that are in the ESP32 kit (speakers, breadboard extender, etc.), as our wiring diagrams will be written for the ESP32 and we will be using various elements included in the ESP32 kit.
You can buy the ESP32 Kit from the following links:
You can buy the ESP32 Kit from the following links:
- Freenove Basic Starter Kit for ESP32 at Amazon
- Freenove Basic Starter Kit for ESP32 at the FREENOVE Homepage
- ESP32 Kits are also available for purchase through the UCLA bookstore
Python Set-up
In this class, we will not be running Python on your own computer. Instead, we will be running code on the Google Drive servers. Your code and data will be on a Google Drive. This helps us ensure against cheating and will allow us to easily access your code if you need assistance. To make sure that you can access the system, please follow the following tutorial to run a Google Drive Jupyter notebook.
Jupyter Tutorial
During our first class, you will be given access to the class-wide Google Drive.
Jupyter Tutorial
During our first class, you will be given access to the class-wide Google Drive.