User Tag List

Results 1 to 3 of 3

Thread: Serial Object & USB Servo Controller

  1. #1
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)

    Serial Object & USB Servo Controller

    I'm attempting to use the Serial object to use a USB Servo Controller with MMF2, but so far without any success.

    The relevant instructions provided by the manufacturer are here:
    http://www.pololu.com/docs/0J40/5.c
    http://www.pololu.com/docs/0J40/5.e

    I've tried both protocols, but I'm mainly interested in the simpler "Mini SSC protocol".

    This is some simple code that I've tried:

    + Start of frame
    -> Binary: Resize binary to 3 bytes
    -> Serial: Open COM 7 with a baud rate of 9600 // I got COM7 from device manager

    + Serial: COM port is open
    + Only one action when event loops
    -> Button: Enable // The button is disabled by default

    + Button clicked
    -> Binary: Set byte 0 to 255 // 255 is the command byte for "SetTarget"
    -> Binary: Set byte 1 to 5 // I want to set servo #5
    -> Binary: Set byte 2 to 127 // 127 = return the servo to its centre
    -> Serial: Send string$( "Binary object", 0, 3)

    It opens the port alright, but nothing happens when I click the button (it should set servo #5 to its centre position).
    I don't get any error messages from MMF2 or the Serial object.

    If anyone has any suggestions or thoughts on what I might be doing wrong, I'd be most appreciative

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    Ls2's Avatar
    Join Date
    Jun 2011
    Location
    Maceió - Brazil
    Posts
    927
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    MuddyMole,

    If you use microcontroller, you can make it very easy using Serial Object. To do it, send a little string or charactere (like 'A') and ready it in microcontroller.

  3. #3
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,016
    Mentioned
    21 Post(s)
    Tagged
    2 Thread(s)
    MM - Just out of curiosity, have you tried layering the Button clicked event to one action per condition?

    IE:
    +Button Clicked
    -> Binary: Set byte 0 to 255
    +Button Clicked
    -> Binary: Set byte 1 to 5
    +Button Clicked
    -> Binary: Set byte 2 to 127
    +Button Clicked
    -> Serial: Send string$("Binary Object",0,3)

    The reason why I ask is; there are, albeit 1/1000 chance, but there are some oddities sometimes when piling all the actions into one condition, with hardly anybody using the Serial and Binary object together this could be one of those oddities.
    Want to learn Clickteam Fusion 2.5?




Similar Threads

  1. The Serial Object: MMF2 Serial Port Control
    By aw5 in forum Extension Development
    Replies: 19
    Last Post: 29th December 2020, 05:15 AM
  2. need help with serial number using INI object
    By BrashMonkey in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 30th July 2011, 09:58 AM
  3. serial object programmer!
    By rurkryber in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 21st September 2009, 09:12 PM
  4. question about serial object
    By cel in forum Extension Development
    Replies: 0
    Last Post: 26th August 2009, 12:17 PM
  5. question about the serial object
    By cel in forum Extension Development
    Replies: 1
    Last Post: 23rd March 2009, 06:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •