- Sun Sep 20, 2020 9:08 pm
#43184
Hi!
I'm working on adapting GS-9018 servos to build pan-tilt mechanism for Huskylens. I'm using the basic example (HUSKYLENS_GET_STARED.ino) and added servo support by including Servo library.
The moment I initialize the servos (mysevo.attach), the PWM output starts to quickly rotate the servos in a very "shaky" manner towards one direction. My current code does not do anything with the PWM outputs. I anticipate it's the Huskylens library, since everytime a face is recognized, the servos return to default position. Only the PWM outputs I initialize in the code cause this.
If I upload some basic servo example, evertyhing works fine - the servos follow the instructions and stay still if nothing is being sent. I'm using Arduino Micro, digital PWM outputs, Huskylens in Serial 9600 mode via softserial and an external power supply. FW 4.7 (Stable, with models). What could be the problem? What is the reason the PWM outputs start to control the servos without any instructions in my code?
I'm working on adapting GS-9018 servos to build pan-tilt mechanism for Huskylens. I'm using the basic example (HUSKYLENS_GET_STARED.ino) and added servo support by including Servo library.
The moment I initialize the servos (mysevo.attach), the PWM output starts to quickly rotate the servos in a very "shaky" manner towards one direction. My current code does not do anything with the PWM outputs. I anticipate it's the Huskylens library, since everytime a face is recognized, the servos return to default position. Only the PWM outputs I initialize in the code cause this.
If I upload some basic servo example, evertyhing works fine - the servos follow the instructions and stay still if nothing is being sent. I'm using Arduino Micro, digital PWM outputs, Huskylens in Serial 9600 mode via softserial and an external power supply. FW 4.7 (Stable, with models). What could be the problem? What is the reason the PWM outputs start to control the servos without any instructions in my code?