Supported target values

What resolution can I apply to the target value.
I rounds the value 0.016 to 0.02.

You could put the value in degrees instead of radians?

Thank you.

Hey @Francesc_Riera_Vidal,

The resolution will depend of your sensor really. The value that motor.move(target) receives is float32 number.

The reason why you are seeing the value that is rounded is because of the display in serial monitor. When you do:


the output will be

So your target value can be any value you want basically. Or better said, any value which fits in float32

If you wish to see more than 2 decimal points in serial monitor you can add:

Serial.print(target, 4); // for 4 decimal points
Serial.print(target, 10); // for 10 decimal points

Thank you very much for the reply.

You could put the value in degrees instead of radians?

The trig functions in arduino e.g(sin, cos) expect radians. I guess an argument could be made for degrees as one of antun’s goals is to help people understand foc but there would be a lot of additional conversions in code just for humans.

Besides, real scientists and engineers use radians! :yum: