Skip to content

Commit 8932ae9

Browse files
update firmware
1 parent a86481b commit 8932ae9

File tree

1 file changed

+5
-0
lines changed
  • firmware/PlatformIO/ESPRacer/src

1 file changed

+5
-0
lines changed

firmware/PlatformIO/ESPRacer/src/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ int ledBlinkTime = 0;
7777
// bool port0_led = false;
7878
// bool port1_led = false;
7979

80+
void HardwareReset();
81+
8082
void SetupRacer()
8183
{
8284
pinMode(STATUS_LED_PIN, OUTPUT);
@@ -88,6 +90,7 @@ void SetupRacer()
8890
pinMode(BATT_VOL_PIN, INPUT);
8991

9092
// pwmの設定 channel,周波数,解像度
93+
ledcSetup(CHANNEL_STATUS_LED_PIN, 1000, 8);
9194
ledcSetup(CHANNEL_SERVO_PIN, SERVO_FREQUENCY, SERVO_RESOLUTION);
9295
ledcSetup(CHANNEL_MOTOR_A_PIN, 1000, 7);
9396
ledcSetup(CHANNEL_MOTOR_B_PIN, 1000, 7);
@@ -98,6 +101,8 @@ void SetupRacer()
98101
ledcAttachPin(MOTOR_B_PIN, CHANNEL_MOTOR_B_PIN);
99102

100103
ledcWrite(CHANNEL_STATUS_LED_PIN, 255);
104+
105+
HardwareReset();
101106
}
102107

103108
String GenerateID(int len)

0 commit comments

Comments
 (0)