8000 don't use channel 1 as it messes with the camera · rjwats/esp8266-react@188274d · GitHub
[go: up one dir, main page]

Skip to content

Commit 188274d

Browse files
committed
don't use channel 1 as it messes with the camera
1 parent 1c94857 commit 188274d

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

platformio.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ lib_deps =
3636
ArduinoJson@>=6.0.0,<7.0.0
3737
ESP Async WebServer@>=1.2.0,<2.0.0
3838
AsyncMqttClient@>=0.8.2,<1.0.0
39-
ESP32Servo@>=0.9.0,<1.0.0
39+
ServoESP32@>=1.0.3,<2.0.0
4040

4141
[env:esp12e]
4242
platform = espressif8266

src/RobotStateService.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ RobotStateService::RobotStateService(AsyncWebServer* server, SecurityManager* se
1919
}
2020

2121
void RobotStateService::begin() {
22-
camXServo.attach(CAM_X_SERVO_PIN);
23-
camYServo.attach(CAM_Y_SERVO_PIN);
24-
clawServo.attach(CLAW_SERVO_PIN);
22+
camXServo.attach(CAM_X_SERVO_PIN, 2);
23+
camYServo.attach(CAM_Y_SERVO_PIN, 3);
24+
clawServo.attach(CLAW_SERVO_PIN, 4);
2525

2626
// configure the default state
2727
_state.camX = DEFAULT_CAM_X;

src/RobotStateService.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
#include <HttpEndpoint.h>
55
#include <WebSocketTxRx.h>
66
#include <Arduino.h>
7-
#include <ESP32Servo.h>
7+
#include <Servo.h>
88

99
#define LED_PIN 2
1010

1111
#define DEFAULT_CAM_Y 90
12-
#define DEFAULT_CAM_X 90
12+
#define DEFAULT_CAM_X 135
1313
#define DEFAULT_CLAW 90
1414

15-
#define CAM_X_SERVO_PIN 16
16-
#define CAM_Y_SERVO_PIN 2
15+
#define CAM_X_SERVO_PIN 2
16+
#define CAM_Y_SERVO_PIN 16
1717
#define CLAW_SERVO_PIN 4
1818

1919
#define ROBOT_SETTINGS_ENDPOINT_PATH "/rest/robotState"

0 commit comments

Comments
 (0)
0