Broadcast vs My Blocks

I am wanting to create “Functions” or “Subroutines” in VEXcode to segregate some of the code. For example I would like to create a Initialize routine and “call” it right after (when started). I have thought that either using a (broadcast and wait) or creating a My Block. I know either would work, but I am wondering if one would work better than the other, maybe being more efficient with memory or timing. I don’t really need to pass parameters. TIA

3 Likes

I would recommend using a custom block as broadcasting and waiting might use more resources then simply using a my block. Also, with broadcasting and waiting, you would have to use another broadcast to ensure that it would work(wait until). So, the my block is probably going to be the best.

1 Like

Thanks for your recommendation. This is what we will go with.