Browse Source

correct pins

master
Thorsten Riess 2 years ago
parent
commit
008a803c43
1 changed files with 6 additions and 7 deletions
  1. +6
    -7
      steuerung/steuerung.ino

+ 6
- 7
steuerung/steuerung.ino View File

@@ -29,8 +29,8 @@ Initialisierung zur Positionsbestimmung?

#include <Servo.h>

#define SERVO_TOP_PIN 4
#define SERVO_BOTTOM_PIN 5
#define SERVO_TOP_PIN 5
#define SERVO_BOTTOM_PIN 6
#define SIGN_PIN 3
#define INTERRUPT_PIN 2 // or 0?
#define HEAD_MOTOR_PIN1 9
@@ -38,8 +38,8 @@ Initialisierung zur Positionsbestimmung?

Servo servoTop, servoBottom;

const int posDown=0, posUp=180, posMid=90;
const int servoDelay=2000;
const int posDown=30, posUp=160, posMid=90;
const int servoDelay=1000;
const int boundLeft=0;
const int velo=33;
int boundRight=200;
@@ -52,7 +52,7 @@ bool switches_old[12]={false,false,false,false,false,false,false,false,false,fal
int switchPositions[6]={0,10,20,30,40,50};

int currentSwitch=-1;
bool waitForInput=false;
bool waitForInput=true;

byte readarr[11];
int spos = 0;
@@ -65,9 +65,8 @@ void setup()
// head motor pins to output
pinMode(HEAD_MOTOR_PIN1, OUTPUT);
pinMode(HEAD_MOTOR_PIN2, OUTPUT);
attachInterrupt(digitalPinToInterrupt(INTERRUPT_PIN), interruptPositionUpdate, RISING);
Serial.begin(19200);
waitForInput=true;
attachInterrupt(INTERRUPT_PIN, interruptPositionUpdate, RISING);
}

void loop()


Loading…
Cancel
Save