Shop OBEX P1 Docs P2 Docs Learn Events
Blocklyprop loop stops — Parallax Forums

Blocklyprop loop stops

Running this loop my microcontroller, a Propellor Activity Board, fairly new but not a WX hangs up and quits on 7th iteration of steps in loop. If I use RAM it quits altogether and when I use eeprom it quits for a short pause then starts up again. It isn't hanging on the end of the loop but goes back to the first step executes it then quits. I attached the code for anybody to look at. This is the untuned beginning of a walking gait for a three servo walker. Any ideas would be appreciated.https://forums.parallax.com/utility/thumbnail/119421/FileUpload/1b/b570a56cbfcfa03ad08e64cac79d6d.pngWalking%20Gait.png
480 x 586 - 33K

Comments

  • The RAM vs. EEPROM behavior suggests that it's resetting. Batteries fresh?

    -Phil
  • Batteries are fine. I am using a 2C lipo and charge is at 8.2 right now. If I remember resets from batteries being low come at random while this thing always occurs at the same spot in program.
  • Carol,

    Does your Blockly generate C or Spin? If the latter, can you post the code it generates? I'm still thinking reset, but since it's so predictable, maybe it's the software that's triggering it.

    -Phil
  • Can you unplug the servos and add a debug line in the loop, and then see if it gets past 7?
  • Try this: load a short Spin program via Propeller Tool into EEPROM that turns on an LED and loops. Then load your program into RAM. If the LED comes on after your program quits, then a reset occurred.

    -Phil
  • I finally found it! It was the old bugaboo that the middle servo was not up to the task. I ended putting a quarter scale servo on the middle leg. It works fine now. Thanks everybody for the help. It all steers my thinking one way or another.
  • Carol,

    Does your Blockly generate C or Spin? If the latter, can you post the code it generates? I'm still thinking reset, but since it's so predictable, maybe it's the software that's triggering it.

    -Phil

    Unfortunately, SPIN support is not up and running, just C.

  • I found the problem Publison. The servo for my middle leg was not up to the task of lifting the body of the walker and strained itself at that time. I replaced it with a quarter scale servo and everything works well now. It was not the software after all.
Sign In or Register to comment.