/
FW LP Part 2

FW LP Part 2

Now that we have our binary components set up, we will now introduce the analog part of the circuit. On the circuit diagram from part 1, there is a potentiometer that is connected to one of the I/O ports of the ESP32. This potentiometer outputs a voltage that we want a numerical reading of, not just an “on” or “off” that would be read by a GPIO. To do this, we will be using an analog to digital converter (ADC), an electrical component that converts an analog voltage into a digital form that can be read by a computer. In the future, the potentiometer will be used to control the acceleration of the car that you are creating. 

 

Deliverables 

  1. A function for configuring the ADCs of the ESP32 

  1. A function for reading the result of an ADC conversion 

 

References that you will need to complete this task: 

  1. Circuit Schematic 

  1. Esp32-wroom-32e data sheet 

  1. ESP-IDF Programming Guide 

 

Suggested steps to get started on this part 

  1. Look at the schematic to know which pin the ADC is on 

  1. Learn what an ADC does to understand the format of the data it outputs, and read the data sheet of the ESP32 to figure out how to map the ADC output to a voltage 

  1. Use the ESP32 API documentation to figure out how to configure the ADC and read values from it