Coding piston in vexcode v5 text (c++)

help im having a coding crisis here

so what i want it to do is that when we press a button, the piston retracts and goes up 3 times. how do we do that in vexcode v5 text, c++? I havent been able to find anything online

There are plenty of posts on the forums that have similar questions, and many have code included. Please search before you post.

2 Likes

Well what do you know how to do? If you know how to use a piston in the code, you shouldn’t have too much of an issue if you do some research.

Never mind, I found it out. I’m just doing it via block, since it’s easier

Cylinders use digital signals (true and false, 0 and 1, on and off) to extend and retract using a solenoid.

2 Likes