Shop OBEX P1 Docs P2 Docs Learn Events
Motor controller problems — Parallax Forums

Motor controller problems

tom90tom90 Posts: 55
edited 2007-07-24 21:18 in Propeller 1
I wrote code in spin to control a motor with the pololu serial motor controller, and got that to work pretty well. Then, I wrote a simple program in VB to input user control (faster, slower, etc.), I have also used Hyperterminal and some spin code to do the same thing. The problem I have ran into is that whatever I use to control the motor, VB or Hyperterminal, eventually freezes after the motor has been running for a short while, and will no longer accept any input. A second problem that has also occured is that the motor will just shut off at random times. There doesn't seem to be any pattern to when either of these events occurs.

Any suggestions?

Thanks,
Tom

Post Edited (tom90) : 7/24/2007 8:46:33 PM GMT

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-07-24 20:36
    If you would like help with your problem, you will need to post a diagram of your setup and the source of your program (as attachments preferably). Usually problems like this are the result of bugs in the program, often due to method calls without returns or other causes of a program writing over part of itself.
  • tom90tom90 Posts: 55
    edited 2007-07-24 20:49
    Thanks Mike, I meant to do that but forgot. I added the attachments of my spin code and my VB code on my original post. As far as the layout, I think all you need to know is that Pin 0 goes to the serial control input of the motor controller and Pin 1 goes to the reset pin of the motor controller.

    Thanks
    Tom
  • Mike GreenMike Green Posts: 23,101
    edited 2007-07-24 20:58
    For a start, your stack is way too small for use with the BS2 functions. Try increasing it to 100 rather than 25, then try again.
  • tom90tom90 Posts: 55
    edited 2007-07-24 21:18
    Mike, at first I thought that did it, but right after I posted something my program froze.

    Any more suggestions?

    Thanks for the help,
    Tom

    Post Edited (tom90) : 7/24/2007 9:26:34 PM GMT
Sign In or Register to comment.