Skip to content

Commit 9631863

Browse files
committed
release, save, load
1 parent 448e7df commit 9631863

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

Bluetooth-Arduino-Prosthetic-Control.ino

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,17 @@ void setup() {
9292

9393
void loop() {
9494
button.loop();
95-
//buttonReadHold();
95+
delay(15);
96+
buttonReadHold();
97+
delay(15);
9698
}
9799

98100
void handler(Button2& btn) {
99101
Serial.println(btn.isPressed());
100102
switch (btn.getClickType()) {
101103
case SINGLE_CLICK:
102104
Serial.println("single ");
105+
handServos.movee();
103106
break;
104107
case DOUBLE_CLICK:
105108
Serial.println("double");
@@ -159,8 +162,8 @@ void updateCounter() {
159162
if (buttonState == LOW) {
160163
holdTime = millis() - startPressed;
161164
if (holdTime >= 1100) {
162-
// handServos.openFingers();
163-
// handServos.openThumb();
165+
handServos.openFingers();
166+
handServos.openThumb();
164167
}
165168
} else {
166169
idleTime = millis() - endPressed;

HandServos.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,10 @@ void HandServos::movee() {
258258
if((millis() - lastUpdate) > updateInterval) // time to update
259259
{
260260
lastUpdate = millis();
261-
servoT.write(myRamp.update());
262-
servoI.write(myRamp.update());
263-
servoM.write(myRamp.update());
264-
servoR.write(myRamp.update());
261+
servoT.write(0);
262+
servoI.write(0);
263+
servoM.write(0);
264+
servoR.write(0);
265265
delay(10);
266266
}
267267
}

0 commit comments

Comments
 (0)