Stall block usage in blockyprop program

Hi All, Anyone have a stall usage program, in Blockyprop, that they could post here,
Or could explain how to use the three items in the reference section. Thx, Bill

Comments

  • Bill,
    Which reference (activity board or scribler) and which subsection?

    Thanks
    tom
  • Courtney JacobsCourtney Jacobs Posts: 901
    edited 2016-11-14 - 23:28:31
    I believe Hermit is referring to the 3 stall blocks for the Scribbler 3.

    http://learn.parallax.com/support/reference/scribbler-3-robot-block-reference/sensors/stall

    We do not have any official tutorials on their usage yet, but these blocks are most often used in "if...else"-type statements where one of the conditions you are looking for is whether or not your robot is stuck. Of all the S3 blocks, the stall blocks are some of the most complicated, and they rely on a combination of drive wheel/tail wheel encoder information, motor current, and various error calculations. If you are a new or beginner-level user of the S3, it is recommended to only use the detect stall block from the SIMPLE SCRIBBLER > SIMPLE SENSORS category. This block will be suitable for almost every program.

    The SIMPLE SENSORS detect stall block is its own "if...do" statement, meaning you can nest blocks within it to be executed anytime the S3 robot detects or does not detect a stall condition (based on your choice). This block then snaps anywhere into the code that you want the check to occur. If your program is a continuous-driving program, this will likely be part of an infinite loop.

    Example: if you want drive continuously forward with your S3, but also make sure that your Scribbler 3 can execute a 90 degree turn to escape a stall (like running into a wall). I built two quick programs that both execute the example I just suggested – they're in an image below. If you run them, you'll notice that the code may be a little different for each but the behaviour it results in is the same.

    stall.png

    The advanced tail wheel stall and drive wheel stall blocks are "keyed" boolean input blocks, meaning they attach to other blocks that accept boolean values, and they can only evaluate as either true (1 - stalled) or false (0 - not stalled). They are meant to fit into "if...else" statements, but there is a known issue where they do not behave as intended. This is being corrected in a future update, but for now I would recommend not using either.

    There is a lot of code within the Scribbler 3 Spin object that allows the BlocklyProp blocks to make a decision on a stall versus a no stall condition, which I am not going to go into here. If you are comfortable with Spin programming, you are welcome to view the scribbler object code, which comes in the Open Source download on the #28333 product page. You can also look into the open source BlocklyProp Github repository.

  • Thanks Guys, Excellent response and information. I am encouraged to see that this forum will be a great source of instructional reading and examples.
  • Hey Hermit,

    Ask any time. Courtney beat me to the punch with a great - detailed answer. Way to go Courtney!
    Whit+

    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
Sign In or Register to comment.