Go Down

Topic: Need programming help, could include some cash (Read 1 time) previous topic - next topic

crzycrzy

Tired of pulling my hair out so I might as well ask for someone who knows what the heck they are doing

Arduino Uno
Running a stepper motor driver
4 buttons to run the motor to 4 cardinal positions
1 button to start and stop it running clockwise
1 button to start and stop it running counterclockwise

And a couple other items to be discussed.

Anyone ?

Thanks

PaulS

Quote
4 buttons to run the motor to 4 cardinal positions

How are the cardinal positions defined? Are the motors moving a carriage that trips a limit switch?

crzycrzy

Set number of steps... 17750 is one quarter turn.  So need to track current position and number of steps to next position defined by which button pushed.

The other half is while it is running clockwise or counter clockwise continuously ( as defined by button 5 and 6 ( Which if hit again would stop the motor )) it needs to track the number of steps ( position ) so if one of the four cardinal points are pushed it will go to that location.

The whole idea of the project is they are presenting a building on a turntable.... the model will be slowly rotating, as the presenter says " on the west side " they will hit the button and the unit will rotate to the west side and stop... the presenter will then say " on the North side" hit a button and it will rotate to the north side etc etc... until at such point the presentation ends and the presenter will hit the CW(6) or CCW(5) buttons and the model will just continuously rotate.

I'm finishing up the hardware and I have limited control of the motor with the arduino but not all the functions I want.

Thanks all


PaulS

Quote
So need to track current position and number of steps to next position defined by which button pushed.

No, you need to track the current position and calculate the number of steps to the next position (which is defined by which switch is pressed).

It doesn't seem all that complicated, what you want to do.

One switch causes a transition to rotate clockwise mode.
One switch causes a transition to rotate counterclockwise mode.
Four switches cause transitions to N, E, W, or S mode.

Those 4 transitions entail something happening (step rapidly until the number of steps matches a defined value (different for each mode)).

Then, nothing happens when you are in those modes.

In the other two modes, you step periodically (the direction depends on the mode) and update when the last step occurred (as in the blink without delay example).


crzycrzy

Not complicated for someone who knows what they are doing.... me not so much.   That is why I am looking for someone who is willing to write it up and earn some beer money. 
I've just gotten too frustrated, and the beer wasn't helping  :)

Go Up