Go Down

Topic: Serial degrees (Read 1 time)previous topic - next topic

Bstanko6

Sep 18, 2013, 11:36 pm
I think I'm in the right forum.
I have a stepper motor that I hooked up to a pot, I now want to set up the serial to read in 360 degrees. I looked in the libraries, and I did not find anything, I tried google, but I don't think I'm searching the right parameters, as I get nothing of use. Any one know keywords for a search, or can point me in the right direction?

Grumpy_Mike

#1
Sep 18, 2013, 11:42 pm
Sorry I don't understand what you mean by:-
Quote
to set up the serial to read in 360 degrees.

Bstanko6

#2
Sep 19, 2013, 12:19 am
I would like to read the motor as it turns to read 360 degrees. I want to know what the position is on the motor for reference.

#3
Sep 19, 2013, 03:53 pm
Perseverance is 90% of the solution. The remaining 10% is more perseverance.

Grumpy_Mike

#4
Sep 19, 2013, 04:14 pm
So I think you want to output a number in degrees to the serial port.
This depends on how many steps your motor takes to complete one revolution. If it is a 200 step motor this means that each step is 1.8 degrees.
So simply multiply the number of steps the motor has taken by 1.8. Note that this will mean converting the variables into the float type.
Code: [Select]
`float degrees = (float)numberOfSteps * 1.8;Serial.println(degrees);`

Bstanko6

#5
Sep 23, 2013, 03:48 am
Appreciate it.

Go Up

Please enter a valid email to subscribe