OK simple fix to the issues described below. The default serial port is "dev/ttyACM0y". But the correct serial port is '/dev/ttyAMA0'. In the python script we need to specifically define the correct port. For example import maestro import time servo = maestro.Controller('/dev/ttyAMA0') servo.runScriptSub(0) print("sub0") time.sleep(3) servo.close
hey thanks for this. i'm very new to this and trying to follow your vid step by step, but i'v to run into an error. if you can point me in the right direction i would really appreciate it. this is the error: File "test1.py", line 3, in servo = maestro.Controller() File "/home/pi/Maestro/maestro.py", line 33, in __init__ self.usb = serial.Serial(ttyStr) File "/home/pi/.local/lib/python2.7/site-packages/serial/serialutil.py", line 240, in __init__ self.open() File "/home/pi/.local/lib/python2.7/site-packages/serial/serialposix.py", line 268, in open raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg)) serial.serialutil.SerialException: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
Hey Mark, what output do you get when you type "dmesg | grep tty"? Also check to see in the Maestro Control Center application, serial settings tab that you have "UART, fixed baud rate 9600" selected. Also I noticed that I uploaded the wrong test scripts on my website so I just updated them, go and give those a shot. Anyways, from that dump it looks like the error is stemming from the script trying to use the USB serial interface, and we want to make sure it's using the TTL serial interface.
Hey, I have the same issue as Mark. I have download the Maestro from Github directly on my pi but the Maestro Control Center application I installed on my windows. My tty1 is enabled, also, I have ttySO and ttyAMAO appeared for dmesg | grep tty command. I used something like you did in test.py but turns out the error above.
Hi I was just wondering how you could use this as a script not just in the terminal. I am making a launchpad that automatically runs a script when turned on and I just wanted to know if you can just copy the script in 25:45.
Hi, and thanks for this video! I was just wondering on thing: how can you execute subs in the last part of the vidéo? When I give a try, it just displays sub0 or sub1, but the motors does not move (from what I understood, the frames are not saved on the controller, so I don't get how the RPI is able to get the subs/frame to execute them). Thanks for your help!
Answering to myself. In fact I had an issue because I already saved frames to my pololu (long time ago, when performing tests on Windows). I deleted everything, applied setting once frames where defined and it is now OK (if it might help others)
Your work is very useful for one of my physics project , thanks . I followed your steps but I have some problem . Please help me with these error : Traceback (most recent call last): File "sub.py", line 3, in servo = maestro.Controller() File "/home/pi/Maestro/maestro.py", line 33, in __init__ self.usb = serial.Serial(ttyStr) File "/home/pi/.local/lib/python2.7/site-packages/serial/serialutil.py", line 240, in __init__ self.open() File "/home/pi/.local/lib/python2.7/site-packages/serial/serialposix.py", line 268, in open raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg)) serial.serialutil.SerialException: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
5 years later....an old guy in the back yells....thank you...just what I was looking for :-)
OK simple fix to the issues described below. The default serial port is "dev/ttyACM0y". But the correct serial port is '/dev/ttyAMA0'. In the python script we need to specifically define the correct port. For example
import maestro
import time
servo = maestro.Controller('/dev/ttyAMA0')
servo.runScriptSub(0)
print("sub0")
time.sleep(3)
servo.close
Thank you for this!!!
hey thanks for this.
i'm very new to this and trying to follow your vid step by step, but i'v to run into an error.
if you can point me in the right direction i would really appreciate it.
this is the error:
File "test1.py", line 3, in
servo = maestro.Controller()
File "/home/pi/Maestro/maestro.py", line 33, in __init__
self.usb = serial.Serial(ttyStr)
File "/home/pi/.local/lib/python2.7/site-packages/serial/serialutil.py", line 240, in __init__
self.open()
File "/home/pi/.local/lib/python2.7/site-packages/serial/serialposix.py", line 268, in open
raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
Hey Mark, what output do you get when you type "dmesg | grep tty"? Also check to see in the Maestro Control Center application, serial settings tab that you have "UART, fixed baud rate 9600" selected. Also I noticed that I uploaded the wrong test scripts on my website so I just updated them, go and give those a shot. Anyways, from that dump it looks like the error is stemming from the script trying to use the USB serial interface, and we want to make sure it's using the TTL serial interface.
Hey, I have the same issue as Mark. I have download the Maestro from Github directly on my pi but the Maestro Control Center application I installed on my windows. My tty1 is enabled, also, I have ttySO and ttyAMAO appeared for dmesg | grep tty command. I used something like you did in test.py but turns out the error above.
Hi I was just wondering how you could use this as a script not just in the terminal. I am making a launchpad that automatically runs a script when turned on and I just wanted to know if you can just copy the script in 25:45.
There are several methods. www.dexterindustries.com/howto/run-a-program-on-your-raspberry-pi-at-startup/
Is there a risk in not using a level controller for the serial connection, as the Pi uses 3.3V while the Maestro uses 5V logic?
Seems like I overlooked this detail. I believe you are right, the pins may be damaged in the long run.
Hi, and thanks for this video! I was just wondering on thing: how can you execute subs in the last part of the vidéo? When I give a try, it just displays sub0 or sub1, but the motors does not move (from what I understood, the frames are not saved on the controller, so I don't get how the RPI is able to get the subs/frame to execute them). Thanks for your help!
Answering to myself. In fact I had an issue because I already saved frames to my pololu (long time ago, when performing tests on Windows). I deleted everything, applied setting once frames where defined and it is now OK (if it might help others)
Pity that you didn't demonstrate the Servo's actually moving under the program control
Your work is very useful for one of my physics project , thanks . I followed your steps but I have some problem .
Please help me with these error :
Traceback (most recent call last):
File "sub.py", line 3, in
servo = maestro.Controller()
File "/home/pi/Maestro/maestro.py", line 33, in __init__
self.usb = serial.Serial(ttyStr)
File "/home/pi/.local/lib/python2.7/site-packages/serial/serialutil.py", line 240, in __init__
self.open()
File "/home/pi/.local/lib/python2.7/site-packages/serial/serialposix.py", line 268, in open
raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
Have you tried running the script in sudo, also have you enabled the serial interface?
maestro is pronounced my-stroe