Changed Servo Pin and Board to Uno
This commit is contained in:
parent
b6434324cd
commit
624e390373
@ -10,6 +10,6 @@
|
||||
|
||||
[env:arduino]
|
||||
platform = atmelavr
|
||||
board = megaatmega2560
|
||||
//board = uno
|
||||
//board = megaatmega2560
|
||||
board = uno
|
||||
framework = arduino
|
||||
|
14
src/main.cpp
14
src/main.cpp
@ -3,15 +3,12 @@
|
||||
#include <Servo.h>
|
||||
#include <LiquidCrystal.h>
|
||||
|
||||
int servoPin = 50;
|
||||
int servoPin = 11;
|
||||
|
||||
Servo servo;
|
||||
|
||||
int servoAngle = 0;
|
||||
|
||||
// Steps per Revolution for Small Stepper
|
||||
#define smallStepperStepsRev 32
|
||||
|
||||
// Steps per Revolution for Big Stepper
|
||||
#define bigStepperStepsRev 200
|
||||
|
||||
@ -24,8 +21,7 @@ int servoAngle = 0;
|
||||
#define btnNONE 5
|
||||
|
||||
// Then the pins are entered here in the sequence 1-3-2-4 for proper sequencing
|
||||
Stepper smallStepper(smallStepperStepsRev, 30, 31, 32, 33);
|
||||
Stepper bigStepper(bigStepperStepsRev, 52, 53);
|
||||
Stepper bigStepper(bigStepperStepsRev, 2, 3);
|
||||
|
||||
// setup for 'LCD Keypad Shield'
|
||||
LiquidCrystal lcd(8,9,4,5,6,7);
|
||||
@ -33,7 +29,6 @@ LiquidCrystal lcd(8,9,4,5,6,7);
|
||||
/*-----( Declare Variables )-----*/
|
||||
// Big Stepper 1 Revolution = 6400 Steps
|
||||
// Small Stepper 1 Revolution = 2048 Steps
|
||||
int smallRev = 2048;
|
||||
int bigRev = 6400;
|
||||
int revCounter = 0;
|
||||
int bigStepCounter = 0;
|
||||
@ -90,11 +85,6 @@ void moveBigStepper(int Steps2Take, int StepsSpeed) {
|
||||
bigStepper.step(Steps2Take);
|
||||
}
|
||||
|
||||
void moveSmallStepper(int Steps2Take, int StepsSpeed) {
|
||||
smallStepper.setSpeed(StepsSpeed);
|
||||
smallStepper.step(Steps2Take);
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
lcd_key_prev = lcd_key;
|
||||
|
Loading…
Reference in New Issue
Block a user