2

I hope you can help me with this. I'm on an education where we practice all stuff about IT. I'm currently working on the Spinner Factory project in the EV3. However, when i looked through the program description, I stumbled upon this pictureGC Block

I have no idea what the grey block before start block means. I've tried a lot of googling, but can't find a solution. I don't know how to implement it either,.

1 Answer 1

0

My Blocks can have input and output parameters.

What you're seeing is an input parameter.

This particular My Block has as input parameter the color the factory bridge needs to drive to.

If you create a My Block from a selection of blocks and there are already data wires going in or out of the selection, input and output parameters are created automatically.

You can also add or edit input or output parameters in the My Block Builder dialog.

Perhaps this tutorial helps: http://stemrobotics.cs.pdx.edu/sites/default/files/MyBlocks%20%281%29.pdf

4
  • I'm trying that out now. What would the default value be for the parameter?
    – user10281
    May 9, 2018 at 9:35
  • I don't know. You should inspect where the MyBlock is used. If the rest of the program is well designed, the MyBlock will always be used with the parameter specified so it doesn't matter what you select as default parameter as the default will never be used. But however, perhaps as a short-cut, they've given priority to one particular color. In that case you can set this as the default parameter and for that color, no parameter needs to be passed to the MyBlock May 9, 2018 at 9:39
  • Hmm. I still can't figure it out. I can create a MyBlock and "attach" a parameter to it. But it seems that somehow a parameter os created before turning it into a MyBlock
    – user10281
    May 9, 2018 at 9:51
  • You need to have one or more blocks selected that will get turned into a MyBlock, if data wires are going in or out to one or more of the arguments of the selected blocks, parameters are indeed created automatically. I assume you can edit them afterwards... If not, and the automatic parameter creation is problematic, remove the data wires before creating the MyBlock... May 9, 2018 at 12:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.