Shop OBEX P1 Docs P2 Docs Learn Events
vb + spin: program running really slow — Parallax Forums

vb + spin: program running really slow

russ christensenruss christensen Posts: 84
edited 2009-03-07 03:29 in Propeller 1
I am working on an app to communicate with my bot, and its running really slow. Like i have to wait a second or two before my bot even recognizes that its receiving commands. Can somebody take a look at my code and tell me whats going on? also sometimes when i turn my bot on, the wheels start going crazy. i have a video of it i'll try to get on youtube. any suggestions?

russ

edit: i'm using visual studio 2008

Comments

  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2009-03-07 03:29
    Hi Russ, your application interface is working as it should and quite quickly too so the problem must be in the spin routine somewhere. I don't have everything to hook up a system that goes with your code but I did try your robo routine with some spin that I typed up. One thing that I did that might be of help to you was to include a header followed by a number representing·one of seven·actions ( the code did not include the speed value from the trackbar ).

    I posted this code in another thread once and just because it works does not neccessarily mean its the right way, check it out and see if it makes a difference with your set up.

    Each of the seven buttons should have the following modification

    SerialPort1.Write("!VB1")··· '("!VB2")·("!VB3")·("!VB4")·...etc

    lbl_status.Text = "Moving Forward"

    For testing the spin echoes back the command associated with the value and the command should be displayed on your applications display pane.

    Jeff T.

Sign In or Register to comment.