Skip to content

Commit e53311f

Browse files
committed
fix test.ino
1 parent c17a4c0 commit e53311f

4 files changed

Lines changed: 58 additions & 53 deletions

File tree

HISTORY.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## [1.5.11] - 2016-06-07
2+
3+
### Fix
4+
- Fix Test.ino unused function
5+
16
## [1.5.10] - 2016-06-07
27

38
### Fix

examples/Test/Test.ino

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* Function 7 - 8 : attach or detach all servos (function 7-8)
1717
* Function 9 : uArm calibration
1818
* Function 10 : read current coordinate x,y,z
19-
* Function 11 : recording mode
19+
* Function 11 : recording mode
2020
2121
*/
2222

@@ -27,12 +27,12 @@
2727
#include "uarm_library.h"
2828
#include <Servo.h>
2929

30-
// define a uArm
31-
//uArmLibrary uArm;
32-
int value; // value is the data recevied
30+
// define a uArm
31+
//uArmLibrary uArm;
32+
int value; // value is the data recevied
3333

3434
void setup() {
35-
35+
3636
Wire.begin(); // join i2c bus (address optional for master)
3737
Serial.begin(9600); // start serial port at 9600 bps
3838
}
@@ -45,85 +45,85 @@ void loop() {
4545

4646
char readSerial = Serial.read();
4747
Serial.println(readSerial);
48-
48+
4949
//---------------------------------- function 1 ------------------------------------
50-
// function below is for move uArm from current position to absolute coordinate
51-
// x = 13, y = -13, z = 3
52-
50+
// function below is for move uArm from current position to absolute coordinate
51+
// x = 13, y = -13, z = 3
52+
5353
if (readSerial == '1') {
5454
uarm.moveTo(13,-13,3);
5555
delay(1000);
5656
}
57-
57+
5858
//---------------------------------- function 2 ------------------------------------
5959
// function below is for move uArm from current position to absolute coordinate
60-
// x = -13, y = -13, z = 3
61-
60+
// x = -13, y = -13, z = 3
61+
6262
if (readSerial == '2') {
6363
uarm.moveTo(-13,-13,3);
6464
delay(1000);
6565
}
6666

6767
//---------------------------------- function 3 ------------------------------------
68-
// function below is for move uArm from current position to relatvie coordinate
69-
// (dot) dx = 4, dy = -3, dz = 2 in 5 seconds
70-
68+
// function below is for move uArm from current position to relatvie coordinate
69+
// (dot) dx = 4, dy = -3, dz = 2 in 5 seconds
70+
7171
if (readSerial == '3') {
7272
uarm.moveTo(1,1,1,RELATIVE,2);
7373
delay(1000);
7474
}
75-
75+
7676
//---------------------------------- function 4 ------------------------------------
77-
// function below is for move uArm from current position to relatvie coordinate
78-
// (dot) dx = -4, dy = 3, dz = -2 in 5 seconds
79-
77+
// function below is for move uArm from current position to relatvie coordinate
78+
// (dot) dx = -4, dy = 3, dz = -2 in 5 seconds
79+
8080
if (readSerial == '4') {
8181
uarm.moveTo(-4,3,-2,RELATIVE,5);
8282
delay(1000);
8383
}
84-
85-
//---------------------------------- function 5 ------------------------------------
86-
// function below is for move uArm to draw a Rectangle with 10 cm long and 5 cm
87-
// width in 2 seconds for one arm ( 8s totally)
88-
89-
if (readSerial == '5') {
90-
uarm.drawRec(10,5,2);
91-
delay(1000);
92-
}
9384

94-
//---------------------------------- function 6 ------------------------------------
95-
// function below is for move uArm to draw a ellipse with 10 cm long and 10 cm
96-
// width (circle) for full 360 degree in 2 seconds
97-
98-
if (readSerial == '6') {
99-
uarm.drawCur(6,6,360,2);
100-
delay(1000);
101-
}
85+
//---------------------------------- function 5 ------------------------------------
86+
// function below is for move uArm to draw a Rectangle with 10 cm long and 5 cm
87+
// width in 2 seconds for one arm ( 8s totally)
88+
89+
// if (readSerial == '5') {
90+
// uarm.drawRec(10,5,2);
91+
// delay(1000);
92+
// }
93+
//
94+
// //---------------------------------- function 6 ------------------------------------
95+
// // function below is for move uArm to draw a ellipse with 10 cm long and 10 cm
96+
// // width (circle) for full 360 degree in 2 seconds
97+
//
98+
// if (readSerial == '6') {
99+
// uarm.drawCur(6,6,360,2);
100+
// delay(1000);
101+
// }
102102

103103
//---------------------------------- function 7 ------------------------------------
104104
// function below is atach all servos
105-
106-
if (readSerial == 'a') {
107-
uarm.attachAll();
108-
}
105+
106+
// if (readSerial == 'a') {
107+
// uarm.attachAll();
108+
// }
109109

110110
//---------------------------------- function 8 ------------------------------------
111111
// function below is detach all servos
112-
112+
113113
if (readSerial == 'd') {
114114
uarm.detachAll();
115115
}
116-
116+
117117
//---------------------------------- function 9 ------------------------------------
118118
// function below is for calibrate uArm
119-
119+
120120
// if (readSerial == 'c') {
121121
// calib.calibrations();
122122
// }
123-
123+
124124
//---------------------------------- function 10 ------------------------------------
125-
// function below is for print current x,y,z absolute location
126-
125+
// function below is for print current x,y,z absolute location
126+
127127
if (readSerial == 'g') {
128128
Serial.print("The current location is ");
129129
Serial.print(uarm.getCalX());
@@ -143,7 +143,7 @@ void loop() {
143143
Serial.print("SERVO_RIGHT_NUM offset:");
144144
Serial.println(uarm.readServoOffset(SERVO_RIGHT_NUM));
145145
Serial.print("SERVO_HAND_ROT_NUM offset:");
146-
Serial.println(uarm.readServoOffset(SERVO_HAND_ROT_NUM));
146+
Serial.println(uarm.readServoOffset(SERVO_HAND_ROT_NUM));
147147
}
148148

149149
if (readSerial == 'o') {
@@ -153,16 +153,16 @@ void loop() {
153153
if (readSerial == 'f') {
154154
uarm.pumpOff();
155155
}
156-
156+
157157
//---------------------------------- function 11 ------------------------------------
158158
// function below is for record a 20 seconds trajactory for uArm
159159
// must put recordingMode in a loop
160-
160+
161161
// if (readSerial == 'r') {
162162
// while(1){
163163
// uArm.recordingMode(10);
164164
// }
165165
// }
166-
166+
167167
} // close read available
168-
}
168+
}

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=uArmLibrary
2-
version=1.5.10
2+
version=1.5.11
33
author=UFactory <developer@ufactory.cc>
44
maintainer=Joey Song <joey@ufactory.cc>, Alex Tan<alex@ufactory.cc>, Dave Corboy<dave@corboy.com>
55
sentence=uArm Library for Arduino

uarm_library.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
#define UARM_MAJOR_VERSION 1
2222
#define UARM_MINOR_VERSION 5
23-
#define UARM_BUGFIX 10
23+
#define UARM_BUGFIX 11
2424

2525
#define SERVO_ROT_NUM 0
2626
#define SERVO_LEFT_NUM 1

0 commit comments

Comments
 (0)