PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Simple Libraries
Robotics
ActivityBot360
libabdrive360
drive_speed.c
1
/*
2
@file drive_speed.c
3
4
@author Parallax Inc
5
6
@copyright
7
Copyright (C) Parallax Inc. 2017. All Rights MIT Licensed. See end of file.
8
9
@brief
10
*/
11
// // //
12
13
14
#include "
abdrive360.h
"
15
16
17
void
drive_speed
(
int
left,
int
right)
18
{
19
if
(!abd360_initialized) drive_init();
20
21
servo360_setAcceleration
(abd360_pinCtrlLeft, abd360_rampStep * 50);
22
servo360_setAcceleration
(abd360_pinCtrlRight, abd360_rampStep * 50);
23
servo360_setMaxSpeed
(abd360_pinCtrlLeft, abd360_speedLimit);
24
servo360_setMaxSpeed
(abd360_pinCtrlRight, abd360_speedLimit);
25
26
servo360_speed
(abd360_pinCtrlLeft, left);
27
servo360_speed
(abd360_pinCtrlRight, -right);
28
//pause(1);
29
//waitcnt(CLKFREQ/1000 + CNT);
30
}
31
32
drive_speed
void drive_speed(int left, int right)
Set wheel speeds in encoder ticks per second. An encoder tick is 1/64th of a revolution,...
Definition:
speed.c:138
servo360_setMaxSpeed
int servo360_setMaxSpeed(int pin, int speed)
Set the maximum servo speed in terms of degrees per second.
Definition:
servo360_setMaxSpeed.c:17
servo360_speed
int servo360_speed(int pin, int speed)
Set servo rotation speed in degrees per second. The default max values range from 720 degrees per sec...
Definition:
servo360_speed.c:17
servo360_setAcceleration
int servo360_setAcceleration(int pin, int unitsPerSecSquared)
Set acceleration in terms of degrees per second squared. The default is 3600 degrees per second squar...
Definition:
servo360_setAcceleration.c:17
abdrive360.h
This library provides a simple set of functions for making the ActivityBot 360 go certain distances a...
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17