LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use a variable within a loop with NXT/EV3 robot?

so i basically want to be able to have a variable/constant created outside of a loop, changed within a loop, and remain change through iterations of the loop.

 

for example, if i create a value of 10 outside the loop and i want to increment by 1 inside the loop until a task is finished, i don't understand how to do this.

 

I'm trying to understand how to do this in order to make my robot move more smoothly, so for example instead of putting a constant value into the power of each motor i could instead have the power be flexibly changing depending on differing conditions. i.e if robot realizes its near the edge of a table it can smoothly change power values to make a smooth turn instead of braking and then turning.

 

Thanks!

0 Kudos
Message 1 of 2
(3,685 Views)
0 Kudos
Message 2 of 2
(3,674 Views)