Thanks for the help, I did go ahead and comment out everything except the single step full revolution part to make sure that it worked and it did, so I just had to go back to my TI 83 programming experience and used an if then or at least arduinos version of one which is an if else.
Well the code below is what I came up with and it is working well, however, it seems that as it starts the single step function it takes one step back then starts its single step revolution??? Also I am still trying to figure a way to do the 5 revs each way in a better way if anyone has any suggestion.
//Stepper test sketch
//this code is meant to be a simple sketch to test stepper motors and the mechanics they are connected to by stepping five rotations in ove direction nand then 5 in the other and then single stepping one full rotation.
//The 5 rotations in each direction work fine but I know the code can be improved a bunch and the single step code does not work and as you can see only takes one step and then starts all the way over.
// Created 11 Mar. 2007
// Modified 30 Nov. 2009
// by Tom Igoe
// Modified 4 July 2012
// By R. Dumouchelle
// Modified 21 April 2014
// by A. Flood
#include <Stepper.h>
const int stepsPerRevolution = 48; // change this to fit the number of steps per revolution
// for your motor
// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 8,11,12,13);
int stepCount = 0; // number of steps the motor has taken
void setup() {
myStepper.setSpeed(200);//set speed in (x)rpm
// initialize the serial port:
Serial.begin(9600);
pinMode(9,OUTPUT);
pinMode(10,OUTPUT);
digitalWrite(9,HIGH);
digitalWrite(10,HIGH);
}
void loop() {
if(stepCount==stepsPerRevolution) {
Serial.println("5 rev clockwise");
myStepper.step(stepsPerRevolution);
myStepper.step(stepsPerRevolution);
myStepper.step(stepsPerRevolution);
myStepper.step(stepsPerRevolution);
myStepper.step(stepsPerRevolution);
delay(500);
Serial.println("5 rev counterclockwise");
myStepper.step(-stepsPerRevolution);
myStepper.step(-stepsPerRevolution);
myStepper.step(-stepsPerRevolution);
myStepper.step(-stepsPerRevolution);
myStepper.step(-stepsPerRevolution);
delay(500);}
else
myStepper.step(1);
Serial.print("steps:" );
Serial.println(stepCount);
stepCount++;
delay(500);
}
I would also like to have a little LCD that I can read the output on and I am not looking to go out and buy one, however I have a bunch of electronics that I use for parts, so does anyone have any suggestions as to where I could find a good, easy to use simple lcd?
I have this really nice 4-5 inch color one from a telephone with Teletype capabilities but I cant for the life of me find any info on it nor can I even find the pinout..
Thanks again!!!!