uarm_library.h
Go to the documentation of this file.
101 #define F_HAND_ROT_REL 4 // hand keeps orientation relative to rotationxn servo (+/- hand parameter)
123 void write_left_right_servo_angle(double servo_left_angle, double servo_right_angle, boolean with_offset);
129 int move_to(double x, double y, double z, double hand_angle, byte relative_flags, double time, byte path_type, byte ease_type, boolean enable_hand);
137 move_to(x, y, z, 0, F_HAND_RELATIVE | (relative ? F_POSN_RELATIVE : 0), time, PATH_LINEAR, INTERP_EASE_INOUT_CUBIC, false);
140 move_to(x, y, z, servo_4_angle, relative ? F_POSN_RELATIVE : 0, time, PATH_LINEAR, INTERP_EASE_INOUT_CUBIC, true);
142 void move_to(double x, double y, double z, int relative, double time, int servo_4_relative, double servo_4_angle) {
143 move_to(x, y, z, servo_4_angle, (relative ? F_POSN_RELATIVE : 0) | (servo_4_relative ? F_HAND_RELATIVE : 0), time, PATH_LINEAR, INTERP_EASE_INOUT_CUBIC, true);
150 move_to(x, y, z, servo_4_angle, relative ? F_POSN_RELATIVE : 0, 0.0, PATH_LINEAR, INTERP_LINEAR, true);
172 void angle_to_coordinate(double theta_1, double theta_2, double theta_3, double& x, double& y, double &z) {
175 void coordinate_to_angle(double x, double y, double z, double& theta_1, double& theta_2, double& theta_3);
184 int write_servo_angle(byte servo_rot_angle, byte servo_left_angle, byte servo_right_angle, byte servo_hand_rot_angle, byte trigger);
185 int write_servo_angle(double servo_rot_angle, double servo_left_angle, double servo_right_angle, double servo_hand_rot_angle);
186 int write_servo_angle(double servo_rot_angle, double servo_left_angle, double servo_right_angle);
void angle_to_coordinate(double &x, double &y, double &z)
Definition: uarm_library.h:169
double read_servo_angle(byte servo_num)
read Angle by servo_num without offset
Definition: uarm_library.cpp:266
void write_left_right_servo_angle(double servo_left_angle, double servo_right_angle, boolean with_offset)
Write the left Servo & Right Servo in the same time (Avoid demage the Servo)
Definition: uarm_library.cpp:126
void move_to(double x, double y, double z, int relative, double time, double servo_4_angle)
Definition: uarm_library.h:139
void coordinate_to_angle(double x, double y, double z, double &theta_1, double &theta_2, double &theta_3)
Calculate the angles from given coordinate x, y, z to theta_1, theta_2, theta_3.
Definition: uarm_library.cpp:319
void angle_to_coordinate(double theta_1, double theta_2, double theta_3, double &x, double &y, double &z)
Definition: uarm_library.h:172
void move_to(double x, double y, double z, int relative, double time)
Definition: uarm_library.h:136
int move_to(double x, double y, double z, double hand_angle, byte relative_flags, double time, byte path_type, byte ease_type, boolean enable_hand)
Move To, Action Control Core Function.
Definition: uarm_library.cpp:544
void move_to(double x, double y, double z, int relative, double time, int servo_4_relative, double servo_4_angle)
Definition: uarm_library.h:142
void move_to_at_once(double x, double y, double z)
Definition: uarm_library.h:146
void read_linear_offset(byte servo_num, double &intercept_val, double &slope_val)
read Linear Offset from EEPROM, From LINEAR_INTERCEPT_START_ADDRESS & LINEAR_SLOPE_START_ADDRESS, each offset occupy 4 bytes in rom
Definition: uarm_library.cpp:240
void write_stretch_height(double stretch, double height)
Write Sretch & Height. This is an old control method to uArm. Using uarm's Stretch and height...
Definition: uarm_library.cpp:439
void get_current_xyz()
Calculate X,Y,Z to g_current_x,g_current_y,g_current_z.
Definition: uarm_library.cpp:466
void move_to(double x, double y, double z, double hand_angle)
Definition: uarm_library.h:133
Definition: uarm_library.h:114
void alert(byte times, byte runt_time, byte stop_time)
Use BUZZER for Alert.
Definition: uarm_library.cpp:35
void move_to_at_once(double x, double y, double z, int relative, double servo_4_angle)
Definition: uarm_library.h:149
Definition: UFServo.h:94
void interpolate(double start_val, double end_val, double *interp_vals, byte ease_type)
"Genernate the position array"
Definition: uarm_library.cpp:493
boolean set_servo_status(boolean attach_state, byte servo_num)
Attach Servo, if servo has not been attached, attach the servo, and read the current Angle...
Definition: uarm_library.cpp:145
void write_servo_angle(byte servo_num, double servo_angle, boolean with_offset)
Write the angle to Servo.
Definition: uarm_library.cpp:97
double analog_to_angle(int input_angle, byte servo_num, boolean with_offset)
Convert the Analog to Servo Angle, by this formatter, angle = intercept + slope * analog...
Definition: uarm_library.cpp:252
double read_servo_offset(byte servo_num)
Read Servo Offset from EEPROM. From OFFSET_START_ADDRESS, each offset occupy 4 bytes in rom...
Definition: uarm_library.cpp:227
double angle_to_coordinate_y(double theta_1, double theta_2, double theta_3)
Calculate Y.
Definition: uarm_library.cpp:659