-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
abdrive360/servo360 - try EEPROM calibration / transfer function adju…
…sting functions #151 Implements calibration. ActivityBot example programs for calibration and displaying calibration settings and results ported to ActivityBot360.
- Loading branch information
1 parent
f3fe072
commit e81d7bb
Showing
25 changed files
with
3,347 additions
and
3 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
360 Dev/ActivityBot360/ActivityBot360 Modified/ActivitiyBot Display Calibration Results.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
ActivityBot Display Calibration Results.c | ||
Display interpolation table values from calibration | ||
http://learn.parallax.com/activitybot/calibrate-your-activitybot | ||
*/ | ||
|
||
#include "simpletools.h" | ||
#include "servo360.h" | ||
#include "abcalibrate360.h" | ||
|
||
int main() | ||
{ | ||
cal_displayResults(); | ||
} | ||
|
9 changes: 9 additions & 0 deletions
9
360 Dev/ActivityBot360/ActivityBot360 Modified/ActivitiyBot Display Calibration Results.side
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
ActivitiyBot Display Calibration Results.c | ||
>compiler=C | ||
>memtype=cmm main ram compact | ||
>optimize=-Os | ||
>-m32bit-doubles | ||
>-fno-exceptions | ||
>defs::-std=c99 | ||
>-lm | ||
>BOARD::ACTIVITYBOARD |
16 changes: 16 additions & 0 deletions
16
360 Dev/ActivityBot360/ActivityBot360 Modified/ActivitiyBot Display Calibration.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
ActivityBot Display Calibration.c | ||
Display interpolation table values from calibration | ||
http://learn.parallax.com/activitybot/calibrate-your-activitybot | ||
*/ | ||
|
||
#include "simpletools.h" | ||
#include "servo360.h" | ||
#include "abcalibrate360.h" | ||
|
||
int main() | ||
{ | ||
cal_displayData(); | ||
} |
9 changes: 9 additions & 0 deletions
9
360 Dev/ActivityBot360/ActivityBot360 Modified/ActivitiyBot Display Calibration.side
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
ActivitiyBot Display Calibration.c | ||
>compiler=C | ||
>memtype=cmm main ram compact | ||
>optimize=-Os | ||
>-m32bit-doubles | ||
>-fno-exceptions | ||
>defs::-std=c99 | ||
>-lm | ||
>BOARD::ACTIVITYBOARD |
23 changes: 23 additions & 0 deletions
23
360 Dev/ActivityBot360/ActivityBot360 Modified/ActivityBot Calibrate.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
ActivityBot Calibrate.c | ||
Calibrate the ActivityBot's servos and encoders | ||
http://learn.parallax.com/activitybot/calibrate-your-activitybot | ||
*/ | ||
|
||
#include "simpletools.h" | ||
#include "servo360.h" | ||
#include "abcalibrate360.h" | ||
|
||
int main() | ||
{ | ||
cal_servoPins(12, 13); | ||
cal_encoderPins(14, 15); | ||
|
||
high(26); | ||
high(27); | ||
cal_activityBot(); | ||
low(26); | ||
low(27); | ||
} |
9 changes: 9 additions & 0 deletions
9
360 Dev/ActivityBot360/ActivityBot360 Modified/ActivityBot Calibrate.side
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
ActivityBot Calibrate.c | ||
>compiler=C | ||
>memtype=cmm main ram compact | ||
>optimize=-Os | ||
>-m32bit-doubles | ||
>-fno-exceptions | ||
>defs::-std=c99 | ||
>-lm | ||
>BOARD::ACTIVITYBOARD |
80 changes: 80 additions & 0 deletions
80
360 Dev/ActivityBot360/ActivityBot360 Modified/drive_goto variations (6).c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* | ||
drive_goto variations.c | ||
This code demonstrates the problem in ActivityBots with servos that both have | ||
the similar zero speed deadband offsets near the allowable limits. Example | ||
instead of 1480 to 1520, both servos hare 1490 to 1530 us zero speed deadbands. | ||
The monitor (with SimpleIDE Terminal) functions have no effect unless you build | ||
the libservo360 project with this un-commented: | ||
#define _servo360_monitor_ | ||
For best results, use the Parallax WX ESP8266 WiFi Module - DIP for programming | ||
and terminal display. | ||
https://www.parallax.com/product/32420d | ||
Make sure to re-comment it when done because it takes a signfiicant program memory. | ||
*/ | ||
|
||
#include "simpletools.h" | ||
#include "abdrive360.h" | ||
|
||
int main() | ||
{ | ||
drive_speed(0, 0); | ||
pause(1000); | ||
servo360_monitorRun(); | ||
pause(1000); | ||
|
||
/* | ||
servo360_setTransferFunction(12, S360_SETTING_VM_CCW, 202); | ||
servo360_setTransferFunction(12, S360_SETTING_VB_CCW, 280); | ||
servo360_setTransferFunction(12, S360_SETTING_VM_CW, 215); | ||
servo360_setTransferFunction(12, S360_SETTING_VB_CW, -126 ); | ||
servo360_setTransferFunction(13, S360_SETTING_VM_CCW, 204 ); | ||
servo360_setTransferFunction(13, S360_SETTING_VB_CCW, 273); | ||
servo360_setTransferFunction(13, S360_SETTING_VM_CW, 214); | ||
servo360_setTransferFunction(13, S360_SETTING_VB_CW, -146); | ||
*/ | ||
|
||
|
||
servo360_setTransferFunction(12, S360_SETTING_VM_CCW, 204); | ||
servo360_setTransferFunction(12, S360_SETTING_VB_CCW, 273); | ||
|
||
servo360_setTransferFunction(12, S360_SETTING_VM_CW, 215); | ||
servo360_setTransferFunction(12, S360_SETTING_VB_CW, -133 ); | ||
|
||
servo360_setTransferFunction(13, S360_SETTING_VM_CCW, 204 ); | ||
servo360_setTransferFunction(13, S360_SETTING_VB_CCW, 253); | ||
|
||
servo360_setTransferFunction(13, S360_SETTING_VM_CW, 215); | ||
servo360_setTransferFunction(13, S360_SETTING_VB_CW, -146); | ||
|
||
|
||
drive_goto(192, 192); | ||
pause(1000); | ||
drive_goto(-28, 28); | ||
pause(1000); | ||
drive_goto(28 * 2, -28 * 2); | ||
pause(1000); | ||
drive_goto(-28, 28); | ||
pause(1000); | ||
drive_goto(-192, -192); | ||
pause(1000); | ||
|
||
drive_goto(128, 192); | ||
pause(1000); | ||
drive_goto(-128, -192); | ||
pause(1000); | ||
drive_goto(192, 128); | ||
pause(1000); | ||
drive_goto(-192, -128); | ||
pause(1000); | ||
|
||
servo360_monitorEnd(); | ||
} |
9 changes: 9 additions & 0 deletions
9
360 Dev/ActivityBot360/ActivityBot360 Modified/drive_goto variations (6).side
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
drive_goto variations (6).c | ||
>compiler=C | ||
>memtype=cmm main ram compact | ||
>optimize=-Os | ||
>-m32bit-doubles | ||
>-fno-exceptions | ||
>defs::-std=c99 | ||
>-lm | ||
>BOARD::ACTIVITYBOARD |
80 changes: 80 additions & 0 deletions
80
360 Dev/ActivityBot360/ActivityBot360 Modified/drive_goto variations (7).c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* | ||
drive_goto variations.c | ||
This code demonstrates the problem in ActivityBots with servos that both have | ||
the similar zero speed deadband offsets near the allowable limits. Example | ||
instead of 1480 to 1520, both servos hare 1490 to 1530 us zero speed deadbands. | ||
The monitor (with SimpleIDE Terminal) functions have no effect unless you build | ||
the libservo360 project with this un-commented: | ||
#define _servo360_monitor_ | ||
For best results, use the Parallax WX ESP8266 WiFi Module - DIP for programming | ||
and terminal display. | ||
https://www.parallax.com/product/32420d | ||
Make sure to re-comment it when done because it takes a signfiicant program memory. | ||
*/ | ||
|
||
#include "simpletools.h" | ||
#include "abdrive360.h" | ||
|
||
int main() | ||
{ | ||
drive_speed(0, 0); | ||
pause(1000); | ||
servo360_monitorRun(); | ||
pause(1000); | ||
|
||
/* | ||
servo360_setTransferFunction(12, S360_SETTING_VM_CCW, 202); | ||
servo360_setTransferFunction(12, S360_SETTING_VB_CCW, 280); | ||
servo360_setTransferFunction(12, S360_SETTING_VM_CW, 215); | ||
servo360_setTransferFunction(12, S360_SETTING_VB_CW, -126 ); | ||
servo360_setTransferFunction(13, S360_SETTING_VM_CCW, 204 ); | ||
servo360_setTransferFunction(13, S360_SETTING_VB_CCW, 273); | ||
servo360_setTransferFunction(13, S360_SETTING_VM_CW, 214); | ||
servo360_setTransferFunction(13, S360_SETTING_VB_CW, -146); | ||
*/ | ||
|
||
/* | ||
servo360_setTransferFunction(12, S360_SETTING_VM_CCW, 204); | ||
servo360_setTransferFunction(12, S360_SETTING_VB_CCW, 273); | ||
servo360_setTransferFunction(12, S360_SETTING_VM_CW, 215); | ||
servo360_setTransferFunction(12, S360_SETTING_VB_CW, -133 ); | ||
servo360_setTransferFunction(13, S360_SETTING_VM_CCW, 204 ); | ||
servo360_setTransferFunction(13, S360_SETTING_VB_CCW, 253); | ||
servo360_setTransferFunction(13, S360_SETTING_VM_CW, 215); | ||
servo360_setTransferFunction(13, S360_SETTING_VB_CW, -146); | ||
*/ | ||
|
||
drive_goto(192, 192); | ||
pause(1000); | ||
drive_goto(-28, 28); | ||
pause(1000); | ||
drive_goto(28 * 2, -28 * 2); | ||
pause(1000); | ||
drive_goto(-28, 28); | ||
pause(1000); | ||
drive_goto(-192, -192); | ||
pause(1000); | ||
|
||
drive_goto(128, 192); | ||
pause(1000); | ||
drive_goto(-128, -192); | ||
pause(1000); | ||
drive_goto(192, 128); | ||
pause(1000); | ||
drive_goto(-192, -128); | ||
pause(1000); | ||
|
||
servo360_monitorEnd(); | ||
} |
9 changes: 9 additions & 0 deletions
9
360 Dev/ActivityBot360/ActivityBot360 Modified/drive_goto variations (7).side
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
drive_goto variations (7).c | ||
>compiler=C | ||
>memtype=cmm main ram compact | ||
>optimize=-Os | ||
>-m32bit-doubles | ||
>-fno-exceptions | ||
>defs::-std=c99 | ||
>-lm | ||
>BOARD::ACTIVITYBOARD |
Oops, something went wrong.