Maestro Servo Controller (Raspberry Pi)

Sdílet
Vložit
  • čas přidán 26. 08. 2024

Komentáře • 17

  • @Steven-jf4cs
    @Steven-jf4cs Před 6 měsíci +1

    5 years later....an old guy in the back yells....thank you...just what I was looking for :-)

  • @stevefox7469
    @stevefox7469 Před 6 lety +2

    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

  • @captainllama5586
    @captainllama5586 Před 2 lety

    Thank you for this!!!

  • @markejenks
    @markejenks Před 6 lety +4

    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'

    • @PiddlerInTheRoot
      @PiddlerInTheRoot  Před 6 lety

      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.

    • @evaying7540
      @evaying7540 Před 5 lety

      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.

  • @grantwatson5665
    @grantwatson5665 Před 5 lety

    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.

    • @PiddlerInTheRoot
      @PiddlerInTheRoot  Před 5 lety

      There are several methods. www.dexterindustries.com/howto/run-a-program-on-your-raspberry-pi-at-startup/

  • @ViennaMike
    @ViennaMike Před 6 lety

    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?

    • @PiddlerInTheRoot
      @PiddlerInTheRoot  Před 6 lety

      Seems like I overlooked this detail. I believe you are right, the pins may be damaged in the long run.

  • @MyDarkneo
    @MyDarkneo Před 3 lety

    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!

    • @MyDarkneo
      @MyDarkneo Před 3 lety

      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)

  • @brianmoore5454
    @brianmoore5454 Před 3 lety

    Pity that you didn't demonstrate the Servo's actually moving under the program control

  • @andreitomut5824
    @andreitomut5824 Před 6 lety

    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'

    • @PiddlerInTheRoot
      @PiddlerInTheRoot  Před 6 lety +1

      Have you tried running the script in sudo, also have you enabled the serial interface?

  • @periplanetaamericanus2301

    maestro is pronounced my-stroe