We set up a pan-tilt mechanism on a camera pole for a project. Two servos are connected to a 32-channel USB servo controller board (Torobot), and the board is connected to the Pi 4 via USB. Goal: send commands from Hermetry to turn the camera. The Hermetry side is done, the Pi receives the command, and I can see it in the logs. But when I write to the board, nothing happens.
import serial
s = serial.Serial("/dev/ttyUSB0", 9600)
s.write("#1P1500T500")
In Python 3 this line was also throwing an error. Adding .encode() made the error go away, but the servo still doesn’t move. The board’s light is on, and the servos resist when turned by hand, so there is power.
Bir proje için kamera direğine pan-tilt mekanizma kurduk, iki servo 32 kanallı bir USB servo kontrol kartına (Torobot) bağlı, kart da Pi 4’e USB ile. Amaç: Hermetry’den komut gönderip kamerayı çevirmek. Hermetry tarafı tamam, Pi komutu alıyor, loglarda görüyorum. Ama karta yazınca hiçbir şey olmuyor.
import serial
s = serial.Serial("/dev/ttyUSB0", 9600)
s.write("#1P1500T500")
Python 3’te bu satır hata da veriyordu, .encode() ekleyince hata gitti ama servo yine durgun. Kartın ışığı yanıyor, servolar elle çevrilmeye direnç gösteriyor yani güç var.