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
Carol Lynn Hazlett
carolhaz391@gmail.com

In the birthing of any machine there is that moment when it actually works. It is always fresh and astounding for me...............Red Whittaker

Comments

  • 8 Comments sorted by Date Added Votes
  • The RAM vs. EEPROM behavior suggests that it's resetting. Batteries fresh?

    -Phil
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • 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 Lynn Hazlett
    carolhaz391@gmail.com

    In the birthing of any machine there is that moment when it actually works. It is always fresh and astounding for me...............Red Whittaker

  • 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
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • 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
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • 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 Lynn Hazlett
    carolhaz391@gmail.com

    In the birthing of any machine there is that moment when it actually works. It is always fresh and astounding for me...............Red Whittaker

  • 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.

    Infernal Machine
  • 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.
    Carol Lynn Hazlett
    carolhaz391@gmail.com

    In the birthing of any machine there is that moment when it actually works. It is always fresh and astounding for me...............Red Whittaker

Sign In or Register to comment.