PropWare  3.0.0.229
C++ objects and CMake build system for Parallax Propeller
abcalibrate360.h
Go to the documentation of this file.
1 
39 #ifndef ABCALIBRATE_H
40 #define ABCALIBRATE_H
41 
42 #if defined(__cplusplus)
43 extern "C" {
44 #endif
45 
46 #include "simpletools.h"
47 #include "servo360.h"
48 #include "abdrive360.h"
49 
50 
51 
52 #ifndef DOXYGEN_SHOULD_SKIP_THIS
53 
54 
55 
56 #define ABD60_PIN_CTRL_L 12
57 #define ABD60_PIN_FB_L 14
58 
59 #define ABD360_PIN_CTRL_R 13
60 #define ABD360_PIN_FB_R 15
61 
62 
63 #ifndef _AB360_EE_Start_
64 
68 #define _AB360_EE_Start_ 63418
69 #endif
70 
71 #ifndef _AB360_EE_Pins_
72 #define _AB360_EE_Pins_ 12
73 #endif
74 
75 #ifndef _AB360_EE_mVccwL_
76 #define _AB360_EE_mVccwL_ 28
77 #endif
78 
79 #ifndef _AB360_EE_bVccwL_
80 #define _AB360_EE_bVccwL_ 32
81 #endif
82 
83 #ifndef _AB360_EE_mVcwL_
84 #define _AB360_EE_mVcwL_ 36
85 #endif
86 
87 #ifndef _AB360_EE_bVcwL_
88 #define _AB360_EE_bVcwL_ 40
89 #endif
90 
91 #ifndef _AB360_EE_mVccwR_
92 #define _AB360_EE_mVccwR_ 44
93 #endif
94 
95 #ifndef _AB360_EE_bVccwR_
96 #define _AB360_EE_bVccwR_ 48
97 #endif
98 
99 #ifndef _AB360_EE_mVcwR_
100 #define _AB360_EE_mVcwR_ 52
101 #endif
102 
103 #ifndef _AB360_EE_bVcwR_
104 #define _AB360_EE_bVcwR_ 56
105 #endif
106 
107 #ifndef _AB360_EE_End_
108 
112 #define _AB360_EE_End_ _AB360_EE_Start_ + 60
113 #endif
114 
115 
116  //
117 #define AB360_ERROR_NONE 0 //
118 #define AB360_ERROR_CABLE_SWAP -1 //
119 #define AB360_ERROR_NO_ENC_SIG_BOTH -2 //
120 #define AB360_ERROR_NO_ENC_SIG_LEFT -3 //
121 #define AB360_ERROR_NO_ENC_SIG_RIGHT -4 //
122 #define AB360_ERROR_NO_MOTION_LEFT -5 //
123 #define AB360_ERROR_NO_MOTION_RIGHT -6 //
124 #define AB360_ERROR_NO_MOTION_BOTH -7 //
125 #define AB360_ERROR_BATTERIES_TOO_LOW -8
126 #define AB360_ERROR_BATTERIES_TOO_HIGH -9
127 #define AB360_ERROR_XFER_OUT_OF_RANGE -10
128 #define AB360_ERROR_POSSIBLE_AB_NOT_360 -11
129 #define AB360_ERROR_CONDITION_UNKNOWN -12
130 
131 
132 
133 #endif // DOXYGEN_SHOULD_SKIP_THIS
134 
135 void cal_supply5V(int setting);
136 
141 void cal_activityBot(void);
142 
143 
156 void cal_servoPins(int servoPinLeft, int servoPinRight);
157 
158 
173 void cal_encoderPins(int fbPinLeft, int fbPinRight);
174 
175 
184 void cal_displayData(void);
185 
186 
193 void cal_displayResults(void);
194 
195 
200 void cal_clear(void);
201 
202 
203 
204 #ifndef DOXYGEN_SHOULD_SKIP_THIS
205 
206 
207 
208 int cal_getEepromPins(void);
209 
210 
211 
212 #endif // DOXYGEN_SHOULD_SKIP_THIS
213 
214 
215 
216 #if defined(__cplusplus)
217 }
218 #endif
219 /* __cplusplus */
220 #endif
221 /* ABCALIBRATE_H */
222 
cal_servoPins
void cal_servoPins(int servoPinLeft, int servoPinRight)
Set the ActivityBot 360's servo pin connections to values other than the default P12 (left servo) and...
Definition: abcalibrate.c:773
cal_activityBot
void cal_activityBot(void)
Run the ActivityBot 360 calibration function. Let it run until the P26 and P27 lights turn off....
Definition: abcalibrate.c:44
simpletools.h
This library provides convenient functions for a variety of microcontroller I/O, timing,...
cal_displayResults
void cal_displayResults(void)
Indicates whether the last calibration was successful or had errors. Errors can be caused by turning ...
Definition: calibrationResults.c:371
cal_encoderPins
void cal_encoderPins(int fbPinLeft, int fbPinRight)
Set the ActivityBot 360's feedback pin connections to something other than the default P14 (left feed...
Definition: abcalibrate.c:787
cal_displayData
void cal_displayData(void)
Display ActivityBot 360 calibration data in the terminal. This data consists of I/O pin values for ...
Definition: Display.c:189
servo360.h
Parallax Feedback 360 High Speed Servo control and monitoring functions. Uses one additional cog to c...
abdrive360.h
This library provides a simple set of functions for making the ActivityBot 360 go certain distances a...
cal_clear
void cal_clear(void)
Clear calibration settings. After this function is called the abdrive360 library will use standard de...
Definition: abcalibrate360.c:671