Shop OBEX P1 Docs P2 Docs Learn Events
Got Dynamixels? — Parallax Forums

Got Dynamixels?

JonnyMacJonnyMac Posts: 9,107
edited 2013-09-15 13:10 in Propeller 1
If you do, would you mind looking over my object and giving it a whirl? Thanks!

Oh... even if you don't have Dynamixels, any constructive feedback is appreciated.


[Edit] I have tested most features and everything seems to work as it should -- just looking for thoughts. Dynamixels are neat, but somewhat tricky; I'm hoping this object helps those wanting to dive into them.

[Edit] Updated driver attached to post #4 (below)

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-09-10 12:42
    I'll dig my Smartarm out and give your code a try.
  • ratronicratronic Posts: 1,451
    edited 2013-09-10 13:32
    Jon I messed up my first post to this thread so I deleted it. I haven't tried all of your functions but I did write this which will turn off the torq for servo#1 and then display the current servo position and temperature in Celsius.
    Con
      _CLKMODE = XTAL1 + PLL16X
      _XINFREQ = 5_000_000
      
      ID = 1              'servo id#
      DP = 0              'servo port pin
      
    Var
      long addr, freq
      
    Obj
       jm : "jm_dynamixel"
      pst : "parallax serial terminal"
      
    Pub main | i
      pst.start(57_600)
      jm.start(DP, 1_000_000)
      jm.wr_byte(1, $18, 0)
      repeat
        pst.char(1)
        pst.str(string("Position = "))
        pst.dec(jm.rd_word(ID, $24))
        pst.chars(32, 5)  
        pst.str(string(13, 13, "Temp     = "))
        pst.dec(jm.rd_byte(ID, $2b)) 
        pst.chars(32, 5)
    
    zip
    18K
    jm.zip 18.4K
  • JonnyMacJonnyMac Posts: 9,107
    edited 2013-09-15 13:10
    After chatting with Kyle at Trossen robotics I came away with the impression that Dynamixels really don't want to deal with more than about 30 packets per second. I rewrote my X/Y report (for a head mechanism a friend is working on) so that it reads the entire contents of the Dynamixel RAM in one packet. The updated driver includes simple methods for pulling bytes and words from any buffer (without worry of alignment).
Sign In or Register to comment.