...
A function for configuring the GPIO pins of the ESP32 microcontroller
A function for reading the voltage level of a GPIO pin
A function for setting the voltage level of a GPIO pin
References that you will need to complete this task:
Suggested steps
...
/hints
Look at the schematic to know pin mappings, and assign pin mappings to the GPIOs
Look at the programming guide to learn the API for accessing the GPIO
...
ports. Using the
gpio_config
function is not recommended as it is harder to get right.gpio_num_t can be referenced via
GPIO_NUM_XX
where XX is the GPIO number you got in step 1.
Test Criteria
Ensure you can toggle both On LED and Spedometer
Ensure you can read whether Accelerate, Brake, and Direction are being pressed down.
Make sure you put your code in the function that has been labeled for this part. Ignore all of the other parts of the code for now, as those are concepts that we will go over later in Launchpad. For this part and the rest of Launchpad, you must demonstrate the proper functioning of your program in order for you to move on to the next part.