Howdy from Texas,
I am working on building a brass annealing machine.
It will basically be a rotating wheel with 4 holes in it that will rotate, pickup a piece of brass, rotate the brass in the flame (pause for a certain time in flame) then advance starting the whole process over.
I am new to the Arduino, I have programmed PLC's and VFD's but all the ones I have dealt with have all been in ladder logic so I do not really have any experience with the programming language. I have been reading and reading but am still not far enough along. My UNO and other parts should be here next week.
I got an UNO starter kit, LCD, Motor shield, and stepper motor.
I am setting the drive up with a 8:1 gear reduction
Here is what I have started on the code but I still keep getting error after error.
I was going to start with 4 switches for different brass and one switch for a manual operation. Eventually I want to setup the LCD so it displays the brass caliber, programmed time, and countdown time in flame.
The other calibers I just need to cut and paste, change the time in flame and the digital input to operate that set of parameters.
Ok so where can I learn additional information on getting this pulled off? My first milestone is just to get it to function, adding the LCD, the Jog button with timing feature in the future will just be icing on the cake....
Thanks in advance for the help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
/*
AUTOMATED CASE ANNEALER
push button to operate function
rotate carriage
time in flame
rotate carriage
different settings for each case
display case and time in flame on display
differnt cases select different switch to set differnt time
Created 8 March 2014
Modified 9 March 2014
Jake Freese
*/
#include <Stepper.h>
#include <LiquidCrystal.h>
//motor 200 steps per revolution
#define STEPS 200
//bipolar stepper motor 4 pins
#define motor pin1 8
#define motor pin2 9
#define motor pin3 10
#define motor pin4 11
//button is setup for each caliber
#define button 3
#define button 4
#define button 5
#define button 6
#define button 7
//button 7 will be for manual jog and timing
#define loop
#define high
const int stepsPerRevolution = 200;
// intalize the stepper library on pins 8 through 11
Stepper MyStepper (200, 8, 9, 10, 11);
//button to operate unit for specific caliber
//initial step count
int stepCount = 0;
//jog speed between time in flame
int setSpeed(240);
//jog distance
int Steps(800);
//time in flame 308 caliber
delay (400);
//display caliber set for, time set, countdown time
//loop as long as button is depressed
I was attempting to use the loop function when the button is closed but I keep getting errors and it is looking like the loop is not the proper function.