Skip to content

Commit

Permalink
git commit more like git kms lol hahahaaha!
Browse files Browse the repository at this point in the history
  • Loading branch information
tguyenn committed Sep 19, 2024
1 parent ee15edd commit d3b7091
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ For this competition, you will be able to control your robot with a wireless gam

It would be impractical to power your ESP32 through your laptop with a super long cable, so you will use a battery pack feeding through a buck converter to power the 5V pin of the ESP32.

<img src="{{ '/_assets/images/buck_converter.png' | prepend: site.baseurl }}" alt="buck_converter.png">
<img src="{{ '/_assets/images/buck_converter.png' | prepend: site.baseurl }}" alt="buck_converter.png" width=400 height=400>

You will use this buck converter to reduce the voltage of the battery pack down to a level the ESP32 can tolerate (5V). Here are the steps to interface the battery pack to the ESP32 (assumes ESP32 is seated in breadboard):

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,13 @@ Control Pins: Connect the control pins (e.g., IN1, IN2, ENA) on the motor contro
| Motor Controller Terminal | ESP32 Pin |
|:-------------|:------------------|
| +5V | 5V |
| IN1 | GPIO |
| IN2 | GPIO |
| ENA | GPIO |
| IN1 | Any GPIO |
| IN2 | Any GPIO |
| ENA | Any GPIO |

The following is an example of configuring and running the motor in software:
```cpp
#include "sdkconfig.h"
#ifndef CONFIG_BLUEPAD32_PLATFORM_ARDUINO
#error "Must only be compiled when using Bluepad32 Arduino platform"
#endif // !CONFIG_BLUEPAD32_PLATFORM_ARDUINO
#include <Arduino.h>

#define IN1 27 // Control pin 1
Expand Down Expand Up @@ -112,9 +109,6 @@ In this competition, we will be using the Arduino servo library to control the s

```cpp
#include "sdkconfig.h"
#ifndef CONFIG_BLUEPAD32_PLATFORM_ARDUINO
#error "Must only be compiled when using Bluepad32 Arduino platform"
#endif // !CONFIG_BLUEPAD32_PLATFORM_ARDUINO
#include <Arduino.h>

#include <ESP32Servo.h>
Expand Down

0 comments on commit d3b7091

Please sign in to comment.