From 137084155acd6c0b6d5acb270fd33f83233182fc Mon Sep 17 00:00:00 2001 From: workshop2 Date: Sat, 2 May 2020 21:02:52 +0100 Subject: [PATCH] Align new servo to center --- experiments/servo-alignment.ts | 2 +- experiments/test-board.ts | 2 ++ psybot-lib/components/frontarm.ts | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/experiments/servo-alignment.ts b/experiments/servo-alignment.ts index 224d3f9..37911db 100644 --- a/experiments/servo-alignment.ts +++ b/experiments/servo-alignment.ts @@ -15,7 +15,7 @@ const run = async () => { var servo = new Servo({ pin: pin, - range: [20, 180], + range: [40, 180], center: true }); diff --git a/experiments/test-board.ts b/experiments/test-board.ts index 2cbe6dd..7052579 100644 --- a/experiments/test-board.ts +++ b/experiments/test-board.ts @@ -12,6 +12,8 @@ const run = async () => { var psybot = await Psybot.Create(config.settings.usbConnection); console.log("Connected :)"); + + await psybot.frontArm.centerAsync(); }; run(); \ No newline at end of file diff --git a/psybot-lib/components/frontarm.ts b/psybot-lib/components/frontarm.ts index 12c4644..29d706b 100644 --- a/psybot-lib/components/frontarm.ts +++ b/psybot-lib/components/frontarm.ts @@ -9,7 +9,7 @@ export class FrontArm { constructor(bottomServoPin: number, topServoPin: number) { this.bottomServo = new Servo({ pin: bottomServoPin, - range: [20, 180], + range: [40, 180], center: true });