Changed Servo Pin and Board to Uno

This commit is contained in:
Manuel Weiser 2018-04-27 20:50:11 +02:00
parent b6434324cd
commit 624e390373
2 changed files with 4 additions and 14 deletions

View File

@ -10,6 +10,6 @@
[env:arduino] [env:arduino]
platform = atmelavr platform = atmelavr
board = megaatmega2560 //board = megaatmega2560
//board = uno board = uno
framework = arduino framework = arduino

View File

@ -3,15 +3,12 @@
#include <Servo.h> #include <Servo.h>
#include <LiquidCrystal.h> #include <LiquidCrystal.h>
int servoPin = 50; int servoPin = 11;
Servo servo; Servo servo;
int servoAngle = 0; int servoAngle = 0;
// Steps per Revolution for Small Stepper
#define smallStepperStepsRev 32
// Steps per Revolution for Big Stepper // Steps per Revolution for Big Stepper
#define bigStepperStepsRev 200 #define bigStepperStepsRev 200
@ -24,8 +21,7 @@ int servoAngle = 0;
#define btnNONE 5 #define btnNONE 5
// Then the pins are entered here in the sequence 1-3-2-4 for proper sequencing // 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, 2, 3);
Stepper bigStepper(bigStepperStepsRev, 52, 53);
// setup for 'LCD Keypad Shield' // setup for 'LCD Keypad Shield'
LiquidCrystal lcd(8,9,4,5,6,7); LiquidCrystal lcd(8,9,4,5,6,7);
@ -33,7 +29,6 @@ LiquidCrystal lcd(8,9,4,5,6,7);
/*-----( Declare Variables )-----*/ /*-----( Declare Variables )-----*/
// Big Stepper 1 Revolution = 6400 Steps // Big Stepper 1 Revolution = 6400 Steps
// Small Stepper 1 Revolution = 2048 Steps // Small Stepper 1 Revolution = 2048 Steps
int smallRev = 2048;
int bigRev = 6400; int bigRev = 6400;
int revCounter = 0; int revCounter = 0;
int bigStepCounter = 0; int bigStepCounter = 0;
@ -90,11 +85,6 @@ void moveBigStepper(int Steps2Take, int StepsSpeed) {
bigStepper.step(Steps2Take); bigStepper.step(Steps2Take);
} }
void moveSmallStepper(int Steps2Take, int StepsSpeed) {
smallStepper.setSpeed(StepsSpeed);
smallStepper.step(Steps2Take);
}
void loop() void loop()
{ {
lcd_key_prev = lcd_key; lcd_key_prev = lcd_key;