The servos don’t move the green led flashes which tells me that this is the correct usb/serial port.
I read the documentation and I can see that there are different command protocols and I tried them all in this script but to no avail.
Could anyone write the simplest perl code which sends a move servo to some position command to get me started.
How did you pick /dev/ttyS0? It is very unlikely that this is correct - but if you run “dmesg” or look in /var/log/messages you should see exactly which ports the Maestro is connected on. The Command Port is probably on /dev/ttyACM0.
Have you configured the Maestro for Dual-Port or Chained mode?
Oh, and the bytes you tried sending were also totally wrong. Were you looking at the documentation for some other controller? You could try the first example give here if you want something guaranteed to work.
The controller is indeed connected to ttyACM0 I pasted older version of my script
It works properly in the control center.
I tried with:
my $pack = pack “CCCC”, 132, 2, 112, 46;
as per the example you linked me to but it still didn’t moved or initialized the servo.
“Have you configured the Maestro for Dual-Port or Chained mode?” – How do I do this and which one do I need in order to interact with perl.
Thanks for the help and sorry for the noobish questions but I’m new to serial communication
Okay, did you see the example C code given below? I expect the same expressions to work in perl (with the addition of a few dollar signs on the variable names, of course).
Unfortunately I can’t translate it correctly to perl.
I’m still tinkering around with the code.
In the meantime if someone knows how the high/low bytes are calculated in perl please assist.