I have a very strange situation. My detector consist of several components: a light sensor, a servo motor and and an led (PWM). Here is wiring:
light sensor - X1, VIN, GND
servo motor - X2, VIN, GND
led(pwm) - X3, GND
When I test the servo motor via picocom, everything works great but when I wire all components and run python3 pyboard.py detector.py - servo doesn't work (other parts work well). If I run python3 pyboard.py servo_test.py :
Code: Select all
# servo_test.py
import pyb
import time
servo = pyb.Servo(2)
for i in range(3):
servo.angle(45)
time.sleep(1)
servo.angle(-45)
time.sleep(1)
Thank you.