new cad and fixes
This commit is contained in:
BIN
arm-mitt-Body.stl
Normal file
BIN
arm-mitt-Body.stl
Normal file
Binary file not shown.
BIN
arm-mitt.FCStd
BIN
arm-mitt.FCStd
Binary file not shown.
BIN
arm-untenV2-Body.stl
Normal file
BIN
arm-untenV2-Body.stl
Normal file
Binary file not shown.
BIN
arm-untenV2.FCStd
Normal file
BIN
arm-untenV2.FCStd
Normal file
Binary file not shown.
BIN
ground.FCStd
Normal file
BIN
ground.FCStd
Normal file
Binary file not shown.
BIN
ground.stl
Normal file
BIN
ground.stl
Normal file
Binary file not shown.
@ -17,8 +17,8 @@ void setup () {
|
|||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
pinMode(SW_pin, INPUT);
|
pinMode(SW_pin, INPUT);
|
||||||
digitalWrite(SW_pin, HIGH);
|
digitalWrite(SW_pin, HIGH);
|
||||||
pinMode(leftButton, INPUT_PULLUP);
|
pinMode(leftButton, INPUT);
|
||||||
pinMode(rightButton, INPUT_PULLUP);
|
pinMode(rightButton, INPUT);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -42,10 +42,14 @@ int currentYState = ServoBase.read();
|
|||||||
if (Y_State > 524) {
|
if (Y_State > 524) {
|
||||||
int newYState = currentYState + 1;
|
int newYState = currentYState + 1;
|
||||||
ServoBase.write(newYState);
|
ServoBase.write(newYState);
|
||||||
|
Serial.print("arm base movement");
|
||||||
|
Serial.print("\n");
|
||||||
delay(15);
|
delay(15);
|
||||||
}else if (Y_State < 502) {
|
}else if (Y_State < 502) {
|
||||||
int newYState = currentYState - 1;
|
int newYState = currentYState - 1;
|
||||||
ServoBase.write(newYState);
|
ServoBase.write(newYState);
|
||||||
|
Serial.print("arm base movement");
|
||||||
|
Serial.print("\n");
|
||||||
delay(15);
|
delay(15);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,11 +62,15 @@ int currentXState = ServoArmOne.read();
|
|||||||
if (X_State > 524) {
|
if (X_State > 524) {
|
||||||
int newXState = currentXState + 1;
|
int newXState = currentXState + 1;
|
||||||
ServoArmOne.write(newXState);
|
ServoArmOne.write(newXState);
|
||||||
|
Serial.print("arm one movement");
|
||||||
|
Serial.print("\n");
|
||||||
delay(15);
|
delay(15);
|
||||||
|
|
||||||
}else if (X_State < 502) {
|
}else if (X_State < 502) {
|
||||||
int newXState = currentXState - 1;
|
int newXState = currentXState - 1;
|
||||||
ServoArmOne.write(newXState);
|
ServoArmOne.write(newXState);
|
||||||
|
Serial.print("arm one movement");
|
||||||
|
Serial.print("\n");
|
||||||
delay(15);
|
delay(15);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,10 +80,10 @@ int currentXState = ServoArmOne.read();
|
|||||||
int currentStateLeftButton = digitalRead(leftButton);
|
int currentStateLeftButton = digitalRead(leftButton);
|
||||||
int currentStateRightButton = digitalRead(rightButton);
|
int currentStateRightButton = digitalRead(rightButton);
|
||||||
int currentStateArmTwo = ServoArmTwo.read();
|
int currentStateArmTwo = ServoArmTwo.read();
|
||||||
Serial.print("button: ");
|
/*Serial.print("button: ");
|
||||||
Serial.print(currentStateLeftButton);
|
Serial.print(currentStateLeftButton);
|
||||||
Serial.print(currentStateRightButton);
|
Serial.print(currentStateRightButton);
|
||||||
Serial.print("\n");
|
Serial.print("\n");*/
|
||||||
|
|
||||||
if (currentStateLeftButton == HIGH) {
|
if (currentStateLeftButton == HIGH) {
|
||||||
Serial.print("test");
|
Serial.print("test");
|
||||||
|
|||||||
Reference in New Issue
Block a user