Page 64
set_digital_pullup [Category: Sensors]
Format:
void
set_digital_pullup(
int
port,
int
pullupTF);
Digital ports provides a pull up resistor for sensors that don't have an integrated pull up
resistor which can be turned off for sensors that set their own pull up value (there aren't any
digital sensors of this type used for Botball). For example,
set_digital_pullup(9,0);
configures digital port 9 to be "floating" (no pull up resistor) whereas
set_digital_pullup(9,1);
configures port 9 as pull up (enables the pull up resistor)
set_digital_value [Category: Output]
Format:
void
set_digital_value(
int
port,
int
value);
Digital ports on the KIPR Link can be configured for either input or output. For a port
configured for output, this function is used to set its value to either 0 (low) or 1 (high). The
port
parameter must be in the range of values 8-15.
set_pid_gains [Category: Motors]
Format:
int
set_pid_gains(
int
motor,
int
p,
int
i,
int
d,
int
pd,
int
id,
int
dd);
This function is used to adjust the weights of the PID control for the motors. The
p
,
i
and
d
parameters are the numerators for the P, I and D coefficients. The
pd
,
id
and
dd
parameters are
their respective denominators. Thus all of the parameters are integers, but the actual
coefficients can be floats. If a motor is jerky, the P and D terms should be reduced in size. If a
motor lags far behind, they should be increased. The default values are set at firmware install
and may be adjusted using the pid screen.
set_servo_position [Category: Servos]
Format:
int
set_servo_position(
int
srv,
int
pos);
Sets the position value of the servo in port
srv
. The value of
pos
must be in the range 0 to 2047.
There are 4 servo ports (0, 1, 2, 3).
set_x_button_text [Category: Sensors]
Format:
void
set_x_button_text(
char
txt[]);
This function sets the text displayed on the X button to be the text string specified rather than
'X'. See also
extra_buttons_hide
,
get_extra_buttons_visible
.
set_y_button_text [Category: Sensors]
Format:
void
set_y_button_text(
char
txt[]);
This function sets the text displayed on the Y button to be the text string specified rather than
'Y'. See also
extra_buttons_hide
,
get_extra_buttons_visible
.
set_z_button_text [Category: Sensors]
Format:
void
set_z_button_text(
char
txt[]);
This function sets the text displayed on the Z button to be the text string specified rather than
'Z'. See also
extra_buttons_hide
,
get_extra_buttons_visible
.
setpwm [Category: Motors]
Format:
int
setpwm(
int
m,
int
dutycycle);
Runs motor
m
at duty cycle
dutycycle
(values-100 to 100)
side_button (or black_button) [Category: Sensors]
Format:
int
side_button();
Reads the value (0 or 1) of the (physical) side button on the KIPR Link.
Содержание KIPR Link
Страница 1: ...KIPR Link Manual Version BB2014 1 1...