I made a python program with pyfirmata that controls servos and/or brushless motors. It works great for a couple of seconds, but then stops responding. I made a short test program as well, and the same thing happens there too. Is there some setting that I dont know of or what is the problem?
Here is the code for the test program:
import pyfirmata
import time
PWM_pin = 9
board = pyfirmata.Arduino('COM3')
board.digital[PWM_pin].mode = pyfirmata.SERVO
def rotate(pin, angle):
board.digital[pin].write(angle)
time.sleep(0.015)
while True:
angle1 = input('What angle?')
rotate(PWM_pin, angle1)