PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Simple Libraries
Robotics
ActivityBot360
libabdrive360
drive_servoPins.c
1
/*
2
@file drive_servoPins.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
// Importrant, must call before anything that controls motion.
18
// (...as in before the cog is launched. We are assuming users do
19
// not intend to hot-swap their ActivityBot connections!)
20
/*
21
void drive_servoPins(int servoPinLeft, int servoPinRight)
22
{
23
abd360_pinCtrlLeft = servoPinLeft;
24
abd360_pinCtrlRight = servoPinRight;
25
}
26
*/
27
28
volatile
int
abd360_suppress_eeprom;
29
30
//
31
void
drive_servoPins
(
int
controlPinLeft,
int
controlPinRight)
// drivePins function
32
{
33
//abd_sPinL = servoPinLeft; // Local to global assignments
34
//abd_sPinR = servoPinRight;
35
//if(!abd_us) abd_us = CLKFREQ/1000000;
36
37
int
eeAddr =
_AB360_EE_Start_
+ _AB360_EE_Pins_;
38
unsigned
char
pinInfo[8] = {
's'
,
'p'
,
'L'
, 12,
' '
,
'R'
, 13,
' '
};
39
pinInfo[3] = (
char
) controlPinLeft;
40
pinInfo[6] = (
char
) controlPinRight;
41
42
if
(!abd360_suppress_eeprom)
43
{
44
ee_putStr
(pinInfo, 8, eeAddr);
45
}
46
47
abd360_pinCtrlLeft = controlPinLeft;
48
abd360_pinCtrlRight = controlPinRight;
49
50
//
51
//if(!abd_intTabSetup)
52
//{
53
// interpolation_table_setup();
54
//}
55
//
56
}
57
//
58
59
_AB360_EE_Start_
#define _AB360_EE_Start_
ActivityBot EEPROM calibration data start address.
Definition:
abcalibrate360.h:68
ee_putStr
void ee_putStr(unsigned char *s, int n, int addr)
Store a string of byte values starting at a certain address in the Propeller Chip's dedicated EEPROM.
Definition:
eeprom_putStr.c:25
abdrive360.h
This library provides a simple set of functions for making the ActivityBot 360 go certain distances a...
char
drive_servoPins
void drive_servoPins(int servoPinLeft, int servoPinRight)
Set servo pins to values other than the default P12 for left servo and P13 for right servo....
Definition:
servoPins.c:188
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17