File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -92,14 +92,17 @@ void setup() {
9292
9393void loop () {
9494 button.loop ();
95- // buttonReadHold();
95+ delay (15 );
96+ buttonReadHold ();
97+ delay (15 );
9698}
9799
98100void 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;
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments