Skip to content

Commit 9347a81

Browse files
committed
fixed pin number on the servo pwm output
1 parent 4767232 commit 9347a81

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/_sections/_guide-primaries/getting-started/environment-setup/windows-setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ Note that it is **your** responsibility to integrate this code with the controll
202202
#include "sdkconfig.h"
203203
#include <Arduino.h>
204204

205-
#define ONBOARD_LED_PIN 2 // defines the word "LED_BUILTIN" as the number 2 for readability
205+
#define ONBOARD_LED_PIN 2 // defines the word "ONBOARD_LED_PIN" as the number 2 for readability. Note that pin 2 is directly attached to the onboard LED of the microcontroller.
206206

207207
void setup() {
208208
pinMode(ONBOARD_LED_PIN, OUTPUT); // configures pin 2 to be a GPIO output pin

docs/_sections/_guide-primaries/sensors-and-actuators/actuators.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ For the servos in our competition, you can use it to precisely control your mech
120120
If you're not sure about the ESP32 pinout, then check out [this page!](https://ut-ras.github.io/RobotathonESP32/getting-started/microcontroller-interface)
121121

122122

123-
In this competition, we will be using the Arduino servo library to control the servos. The following is an example of how to spin a servo using the ESP32's pin 2 as the PWM output.
123+
In this competition, we will be using the Arduino servo library to control the servos. The following is an example of how to spin a servo using the ESP32's pin 12 as the PWM output.
124124

125125
```cpp
126126
#include "sdkconfig.h"
@@ -131,7 +131,7 @@ In this competition, we will be using the Arduino servo library to control the s
131131
Servo myServo;
132132

133133
void setup() {
134-
myServo.attach(2);
134+
myServo.attach(12);
135135
myServo.write(1750);
136136
}
137137

0 commit comments

Comments
 (0)