|
Re: Cutting down motor power
You are likely running into problems with integer division. If you do not put decimal points on your numbers, the compiler will assume that you are using integers. In integer land, multiplying by 5/3 is the same as multiplying by 1, which should cause no change in the elevator motion, and multiplying by 3/5 is the same as multiplying by 0, which explains your lack of elevator movement.
You have already found the easiest solution, which is to just use 0.6 instead of 3/5. If you want to use 3 and 5, write them as 3.0 and 5.0, which will tell the compiler that these are floating point numbers, and thus can have a floating point quotient.
|