Putting block code onto drive function

Hey so my team is using block code to code everything on our robot. We noticed that when we used code like the picture attached to create a toggle for our flywheel, the toggle will only work if we run a “vex code project 1” instead of just hitting drive. Anyway to fix this?

The “drive” button on the brain is just the default controls for the the claw bot and hero bot, and there is no way to make it run your program. You have to select the program slot to run your custom code.


Ok thanks so much!

Well Wishes
-Will from 15800A

Don’t feel bad for using blocks either. We’ve done some amazing things with it, including a basic PID. Search for our “m&m robot” thread for some nice block coding.

Wish more teams used it.

1 Like

Thanks man! This makes me feel better about it. I have a basic knowledge of text code but it was all kinda overwhelming to code that much on a robot

Strongly disagree. Use visual-progamming environments simply to get people into a mindset where they no longer believe programming is the sole domain of genius-wizards. After that, get them programming in a text-based language. Better still, start them off there.

Yes, I understand blocks, etc. are all Turing Complete and one can write programs in them that behave the same as any text-based language.

But it stunts growth and leads to bad habits. See also:

1 Like