Shop OBEX P1 Docs P2 Docs Learn Events
USB BoeBot problem — Parallax Forums

USB BoeBot problem

RongRong Posts: 25
edited 2006-07-31 23:28 in Robotics
Using USB Boebot. Everything working ok until....Page 84 of manual. Final check before assembly of bot.

BothServosThreeSeconds.bs2

Debug "Program Running!"

counter VAR Byte

FOR counter = 1 to 122
PULSOUT 13, 850
PULSOUT 12, 650
PAUSE 20
NEXT

FOR counter = 1 to 122
PULSOUT 13, 650
PULSOUT 12, 850
PAUSE 20
NEXT

END

So here is the problem...the program does not get to the second FOR/NEXT loop. Instead, it just runs and runs on the first loop. Sort of erratically moving the servos. The debug command keeps showing up in the debug terminal...so the program keeps starting over. The servos turn sort of erratically, only in one direction.

I tried all kinds of things, and everything works unless I am trying the above program.

When I delete the second PULSOUT instruction, the program runs ok...It is only when I try to run both servos at once that there is a problem with the for/next loop. Interestingly, I was able to run both servoes concurrently using the previous programs. Everything checks out up to page 84. This board will not run the for next loop with two servos...
.
Now, I have another boebot that I am building concurrently, but the USB version will not work. I have been on this problem for two hours, and got nowhere.
This problem USB bot is being programmed on a different computer, using a USB cable...My serial bot is on another computer.
I believe it is something with the USB board...I tried so many different things with the program, and it comes to this. The for next loop will not run two servoes right. It just sticks on the first pulsout commands, and goes no further.

My son and I are burned out trying to figure it out. Like I said, I went to my other BOEBOT, a serial one I am building concurrently, and the program worked great. Ran servoes three seconds each direction and stopped.

the USB board will not run the program correctly even disconnected from the computer, I read up on that, it is not the problem...Remember, everything up to page 84 works and checked out perfectly...

Any ideas?



this program to work fine using another serial BoEBOT and another computer. I swapped servoes, swapped basic stamps, and no changes. The USB BOE board with servoes will not run this program properly.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ron Giuntini

San Francisco

Comments

  • RongRong Posts: 25
    edited 2006-07-31 23:28
    Hey Gang!
    Figured it out. I tried everything, even going to a third computer with a different USB configuration and downloading v2.2.6. Then I put in a debug line inside the first loop to watch the counter....it never got past 4....
    Hmm, I thought....then I put in a pause 200 after the Pause 20 command, and it counted to 122, like it should...
    Experimenting with pauses in the loop, I could get the two servos to run...sort of...It made a difference..
    Without the pause, never got past 3 or so in the loop.
    Not very digital, was it?
    Well, I wondered why should it stop counting unless there were a pause in the loop?
    The batteries needed a break in the loop I think....or the processor was happier with it...
    What was happening, was the voltage was dropping too low trying to run the two servos, and the program would stop and then start again..

    ...I did not get this at first because for some reason two servos would run in a simple Do/loop program. I guess the For/Next uses a bit more resources....I had no idea the batteries were low..

    Anyway, fresh batteries, and things are fine..

    Actually, my 14 year old was very involved in the troubleshooting, and totally understood the process of really debugging this problem....That was every bit as educational as doing everything by the book up to this point. We took a walk with the dog and talked about how to approach the problem, and he was even thinking how he wanted to go throught he "What's A Microprocessor" workbook to get even more knowledge. He was suggesting things all through the process, and was very helpful.

    NOW ON THE BUILD!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ron Giuntini

    San Francisco
Sign In or Register to comment.