Shop OBEX P1 Docs P2 Docs Learn Events
Selecting com ports in Spin for two props — Parallax Forums

Selecting com ports in Spin for two props

JonathanJonathan Posts: 1,023
edited 2010-04-01 15:24 in Propeller 1
Hi All,

Sorry to bug y'all for such a simple thing, but I just can't find it anywhere. How do I specify which Spin code is to go to which Prop with two Props connected? I thought there was some com port directive (like {COM 16} or something) or place that you could set that, but I can't seem to find it.

Thanks!

Jonathan

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot

Comments

  • John AbshierJohn Abshier Posts: 1,116
    edited 2010-03-30 21:00
    Try Preferences-Edit Ports

    John Abshier
  • JonathanJonathan Posts: 1,023
    edited 2010-03-31 03:36
    John,

    I saw that, but what I am looking for is a wat to associate a particular Spin file with a specific port. I have two props, each with their own Propplu attached, and I'd like to be able to work on both. I just had a thought, maybe I can try running another instance of the editor. I just thought there was some way to specify.

    Thanks!

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2010-03-31 07:23
    Jonathan,

    If you could open up multiple instances of the Propeller tool, then the 'Preferences-Edit Ports' would work, but the tool won't let you do that on the same machine.

    I have run into a similar requirement in the past, and used some nifty FREE software called 'AutoHotKey' that allows you to create keyboard and mouse macros.

    Here is a link to the software ... www.autohotkey.com/download/

    ... here is some example script I use with it ...

    !F1::
    IfWinActive Propeller Tool
      Send {F5}{Click 114,46}{Click 219,307}COM1{Enter}{Click 299,613}{Click 299,613}{F10}
    return
    
    !F2::
    IfWinActive Propeller Tool
      Send {F5}{Click 114,46}{Click 219,307}COM2{Enter}{Click 299,613}{Click 299,613}{F10}
    return
    
    !F3::
    IfWinActive Propeller Tool
      Send {F5}{Click 114,46}{Click 219,307}COM3{Enter}{Click 299,613}{Click 299,613}{F10}
    return
    
    !F4::
    IfWinActive Propeller Tool
      Send {F5}{Click 114,46}{Click 219,307}COM4{Enter}{Click 299,613}{Click 299,613}{F10}
    return
    
    



    ... The script above basically assigns ALT+F1 to COM1, ALT+F2 to COM2, ALT+F3 to COM3, and ALT+F4 to COM4. Pressing ALT+F1, ALT+F2, ALT+F3, or ALT+F4 will program the Propeller as if you pressed F10 having the corresponding assigned comport.


    Note: After pressing ALT+{whatever} you need to be sure and release the keys, or else the key strokes being sent can interfere. i.e. with you holding down the ALT key.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 3/31/2010 7:28:53 AM GMT
  • kuronekokuroneko Posts: 3,623
    edited 2010-03-31 09:04
    Jonathan said...
    ... what I am looking for is a wat to associate a particular Spin file with a specific port.
    IIRC bst allows for individual ports per tab (i.e. SPIN file).

    Post Edited (kuroneko) : 3/31/2010 9:18:49 AM GMT
  • JonathanJonathan Posts: 1,023
    edited 2010-03-31 14:36
    @Beau - Thanks for the link, I'll try that.
    @Kuroneko - what is BST?

    For now, I'm running two innstances of thhe editor, one 1.2.7 and one 1.2.6 . It works so far.

    Thanks!

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • kuronekokuroneko Posts: 3,623
    edited 2010-03-31 14:45
    Jonathan said...
    @Kuroneko - what is BST?
    Just follow the link (http://www.fnarfbargle.com/bst.html).
  • BradCBradC Posts: 2,601
    edited 2010-04-01 15:24
    kuroneko said...
    Jonathan said...
    ... what I am looking for is a wat to associate a particular Spin file with a specific port.
    IIRC bst allows for individual ports per tab (i.e. SPIN file).

    Indeed it does. You can assign any propeller to any tab and the whole configuration is saved in your project file for later.

    You do need to enable "Allow an individual port per edit tab" in Tools->IDE Preferences->IDE Preferences, then you can right-click in the tab and select "Assign Propeller".

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You only ever need two tools in life. If it moves and it shouldn't use Duct Tape. If it does not move and it should use WD40.
Sign In or Register to comment.