mirror of
https://github.com/LinoSchmidt/RoboterArm.git
synced 2026-03-21 02:31:16 +01:00
added debug function
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <Servo.h>
|
#include <Servo.h>
|
||||||
|
|
||||||
|
#define Debug true //----------------------------------Ausschalten Wichtig!---------------------------------------
|
||||||
|
|
||||||
#define servoDrehungPin 9
|
#define servoDrehungPin 9
|
||||||
#define servoArmPin 10
|
#define servoArmPin 10
|
||||||
#define servoOberarmPin 11
|
#define servoOberarmPin 11
|
||||||
@@ -48,7 +50,7 @@ void setup()
|
|||||||
servoOberarm.attach(servoOberarmPin);
|
servoOberarm.attach(servoOberarmPin);
|
||||||
servoHand.attach(servoHandPin);
|
servoHand.attach(servoHandPin);
|
||||||
|
|
||||||
Serial.begin(9600);
|
if(Debug)Serial.begin(9600);
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop()
|
void loop()
|
||||||
@@ -109,7 +111,7 @@ void loop()
|
|||||||
servoHand.write(servoHandPos);
|
servoHand.write(servoHandPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
Serial.println(String(offtime / 10) + "," + String(servoDrehungPos) + "," + String(servoArmPos) + "," + String(servoOberarmPos) + "," + String(servoHandPos));
|
if(Debug)Serial.println(String(offtime / 10) + "," + String(servoDrehungPos) + "," + String(servoArmPos) + "," + String(servoOberarmPos) + "," + String(servoHandPos));
|
||||||
|
|
||||||
delay(loopTime);
|
delay(loopTime);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user