Hello, I am trying to get some stepper motors to do what i want, and they are not cooperating.
A brief description of the application : I have two arduino boards (pro mini's) and 2 easy stepper motor drivers. One arduino is used for user interface, it controls an LCD and and reads user input from either a keypad, or an IR receiver. It also receives serial data from a weight scale. Based on the data it receives from these inputs it sends serial data to the second arduino board. The second board is tasked with controlling 2 stepper motors through the 2 easy driver boards. One stepper motor is driving an auger at the base of a funnel, the second motor drives a wheel that much more precisely dispenses the media.
When a desired weight is entered, and the "go" button is pressed, the auger spins at a fast rate to dispense the bulk of the required media, as the dispensed charge approaches the desired charge, the auger will slow down to avoid over shooting.
Once the dispensed charge is within ~5% of desired, the auger shuts down and the second motor takes care of the remaining deficit.
The secondary motor is working great, but I'm having trouble with the auger side.
I have this working fairly well using simple speed control , The first arduino sends a serial character that is then used by the second to set the "setSpeed" of the auger motor.
Where i am having an issue is at the end of the auger motors cycle, once it has gone through 3 decreasing speeds, i want it to make 1 or 2 revolutions in the opposite direction to clear any media from the end of the auger.
As i am using the simple "setSpeed" followed by the "runSpeed" command, counting steps doesn't really work.
So what i was trying to do was, when the proper serial data came in, stop the motor, use the "setCurrentPosition" command to set the current position to "0", then use the "runToNewPosition" command to reverse the direction for xxx stepps.
I can't seem to get it to work, first problem was the compiler would not recognize the "setCurrentPosition" command. I looked in the keywords file and found that it was misspelled(it was steCurrentPosition), i changed that but it still wont work quite right.
any thoughts? should i approach this a different way?