Shop OBEX P1 Docs P2 Docs Learn Events
Propeller and MotorMindB — Parallax Forums

Propeller and MotorMindB

sharpiesharpie Posts: 150
edited 2007-06-08 08:01 in Propeller 1
Anyone have any working code to interface with this thing?· I'm not having much luck in the past couple days of trying to communicate with it...

Comments

  • FranklinFranklin Posts: 4,747
    edited 2007-06-08 02:18
    It looks like it uses serout and serin. What have you tried that didn't work? (By the way, thanks for posting that SCP1000 code for the propeller. It got me on the right track to get mine working.)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • sharpiesharpie Posts: 150
    edited 2007-06-08 03:42
    I'm not sure what it is just yet but I've tried many things..·
    Started with some demo code for other micros from http://www.solutions-cubed.com/solutions%20cubed/MMB2003.htm
    I'm using the full duplex serial at 2400baud..·
    This doc shows what looks like everything I'd need to get it to go, but I must be reaching some mental block...
    http://www.parallax.com/dl/docs/prod/datast/MotorMindB.pdf
    Here's a snip of my current code...· I get nothing, no blink on the modules led's, no return response from the module, nothing.·
        ser.start(8, 9, 0, 2_400)
    
        
        ser.hex($55,2)
        ser.hex($03,2)
        waitcnt (cnt+500_000)
        ser.hex($55,2)
        ser.hex($83,2)
        ser.hex($DD,2)
        
    
    

    I've tried setting the mode with non inverted..· as well as quite a number of other combinations..
    I'm wondering if the module's serial in is being triggered by the props 3v signal since it's a 5v device...·

    (btw- Your welcome on the scp code.. that was a bit of work.. glad it helped out, it's a great little sensor!· I saw your code and haven't had a chance to try it yet, but look forward to it!)

    Post Edited (sharpie) : 6/8/2007 4:00:52 AM GMT
  • FranklinFranklin Posts: 4,747
    edited 2007-06-08 04:12
    I think you want to use .rx and .tx instead of .hex . rx and tx send bytes where it looks like hex converts a hex number and sends ascii.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • sharpiesharpie Posts: 150
    edited 2007-06-08 07:05
    I'll give that a try.. I also tried decimal and strings, guess it didn't occur to me =)
    Thanks!
  • sharpiesharpie Posts: 150
    edited 2007-06-08 08:01
    That did the trick Franklin, thanks much!
    Works great now!
Sign In or Register to comment.