CrustCrawler Programming Style

All code is written in house to conform to strict CrustCrawler standards of quality readability, and reusability.
More code can be found on the product pages.
Get the Pbasic Editor.
Interface | Robotic Arm | HexCrawler | QuadCrawler | S3 | Archive

Interface and testing code

Test 7 segment LED display connections by cycling through digits 0-9.
Test Push Buttons with DEBUG screen display.
Verify Push Button and 7 segment LED connections by reading two push buttons and updating a 7-segment display. Button1 increments the display, Button2 decrements the display. This program introduces a subroutine for scanning and debouncing both buttons without the use of the PBASIC BUTTON command.
7 segment LED display test using parallel EEPROM tables. This code section is used in the Hex and QuadCrawler walking programs.
Sharp GP2D12 and LTC1298 to BS2 Interface
Interface the Sharp GP2D12 to the BS2 using a LTC1298 analog to digital converter.
Sharp GP2D12 and ADC0831 to BS2 Interface
Schematic and code to interface the Sharp GP2D12 to the BS2 using an ADC0831 analog to digital converter.
Interface a Radio Controller to the BS2. This program reads stick position from a radio control unit, converts the data to a byte value, displays the value on the editor's DEBUG screen, and detects if the RC transmitter is on or off.
Sonic Sight with the Devantech SRF04 by Jon Williams.
Display distance readings from front and rear SHARP GP2D12 infrared sensors mounted to S2 sensor stands. This program allows you to mechanically adjust the S2s to point at a specific distances in fornt of and behind the robot.
Change PSC baud (BS2p) settings and verify PSC version number. This sample code provides examples that change PSC baud modes and display the results to the DEBUG screen.
MAX1112/1113 & SHARP GP2D12 infrared distance detection code. MAX1112/1113 datasheet
Interface | Robotic Arm | HexCrawler | QuadCrawler | S3 | Archive

QuadCrawler

Tune the QuadCrawler legs mechanically and programmatically. Use the programmatic values in all your QuadCrawler code.
Button Interface and Walking Code Using the BS2/BOE and PSC
This fully adjustable and commented walking code contains 15 different walking gaits; fast, slow, forward, backward, spin, and gradual turn left and right. Walking gaits are accessed through a push button interface and displayed on a 7-segement LED. This program introduces a new programming technique, leg position stored in EEPROM (see code comments).
Radio Controlled Walking Code Using the BS2/BOE, PSC, and RC Unit:
This fully adjustable and commented walking code is similar to the code above except the button interface is replaced with a radio controller from Tower Hobbies.
Basic EEPROM Table QuadCrawler Walking Code:(BS2/BOE and PSC)
This code allows you to FULLY control the QuadCrawler's gait programmatically. It takes advantage of EEPROM tables to control servo position and speed. The user interface has been removed so you are left with the "guts" of the QuadWalker program. This code is more like a tutorial crossed with a tool. With a little coding you can create custom walking gaits, control every aspect of leg movement, thoroughly test your creation, or simply investigate a very powerful approach to programming a hexapod. It only uses 21% of the BS2's EEPROM!
Interface with the QuadCrawler Walking Code (BS2/BOE and PSC)
This program is built on the EEPROM table concept. It accepts a hex byte then executes one of 15 default gaits. By design, this program creates an easy interface to the quadCrawler's basic walking routine. It uses only 34% of the BS2's EEPROM and is fully commented!
QuadWalker Infrared obstacle avoidance with a Sharp GP2D12 and ADC0831 8-bit analog to digital converter (A/D). 35% EEPROM resources.
QuadCrawler LCD appmod control Allows you to control the QuadCrawler with Parallax's LCD Appmod. The Appmod is an 8x2 character based LCD display with a 4 button interface.
QuadCrawler LCD Appmod and Infrared distance detection. Parallax's LCD appmod, 2 SHARP GP2D12 infrared detector mounted on front and rear S2 sensor stands from CrustCrawler. Use the Appmod to interface with the walking gaits or run in autonomous mode with the IR/S2 sensor configuration.
RC, Appmod, and IR QuadCrawler control This program adds RC control to the Quad_LCD_Two_GP2D12_S2.bs2 code. When the RC the unit is powered on the IR circuit is disabled. IR autonomous control is returned once the RC unit is powered off.
Please see the QuadCrawler page for the latest code examples.
Interface | Robotic Arm | HexCrawler | QuadCrawler | S3 | Archive

HexCrawler

Test and calibrate the HexCrawler leg servos.
Tune the HexCrawler legs mechanically and programmatically.
LCD Appmod HexCrawler Control
Demo walking code contains 15 different walking gaits; fast, slow, forward, backward, spin, and gradual turn left and right. Walking gaits are accessed through a push button interface and displayed on a 7-segement LED.
Radio Controlled HexCrawler This fully adjustable and commented walking code is similar to the code above except the button interface is replaced with a radio controller from Tower Hobbies.

Basic EEPROM table HexCrawler walking code This code allows you to FULLY control the HexCrawler's gait programmatically. It takes advantage of EEPROM tables to control servo position and speed. The user interface has been removed so you are left with the "guts" of the HexWalker program. This code is more like a tutorial crossed with a tool. With a little coding you can create custom walking gaits, control every aspect of leg movement, thoroughly test your creation, or simply investigate a very powerful approach to programming a hexapod. It only uses 21% of the BS2's EEPROM!
Heavy load version
Wide gait

Interface with the HexCrawler Walking Code. This program is built on the EEPROM table concept. It accepts a hex byte then executes one of 15 default gaits. By design, this program creates an easy interface to the HexCrawler's basic walking routine. It uses only 34% of the BS2's EEPROM and is fully commented!
Test HexCrawler leg joints to verify that they are connected to the PSC in the correct order.
Radio controlled HexCrawler. This code is a combination of 3 modular programs; HexWalker_Base_Program.BS2, HexWalker_Table_PSC_Select.BS2 and RC_Test.BS2. It uses 38% of the BS2's EEPROM.
Button interface walking code using the BS2/BOE and PSC This fully adjustable and commented walking code contains 15 different walking gaits; fast, slow, forward, backward, spin, and gradual turn left and right. Walking gaits are accessed through a push button interface and displayed on a 7-segement LED. This program introduces a new programming technique, leg position stored in EEPROM (see code comments).
Ripple walk using EEPROM tables fully commented. 24% BS2 resources.
Beta Ripple and TriPod gaits using EEPROM tables.
Heavy load HexCrawler basic program.
Please see the HexCrawler page for the lastest code examples
Interface | Robotic Arm | HexCrawler | QuadCrawler | S3 | Archive

S3

Sample scan routine utilizes EEPROM table to create a simple scanning sequence for the S3.
Take distance readings with the Devantech SRF04 sonic range finder.
Beta HexCrawler and S3 Sonic Obstacle Avoidance This code allows for RC control over the HexCrawler while the RC transmitter is powered on. Turn off the transmitter and the S3/SRF04 kick in to provide obstacle avoidance. You do not need an RC controller for this program to function.
Interface | Robotic Arm | HexCrawler | QuadCrawler | S3 |  Archive

Robotic Arm

Basic arm control for the BS2/BS2p and PSC Control the SG5-UT arm programmatically. This code is for use with version 1 of the SG arm. Version 1 has two bicep servos. Please visit the SG product pages for up-to-date code examples.
SG5 RC Robotic Arm
SG6-UT RC Robotic Arm
Sample pickup and place code for the 5 axis robotic arm. This code takes advantage of EEPROM based tables therefore with a little programming you can create unlimited arm movements.
Troubleshoot | Robotic Arm | HexCrawler | QuadCrawler | S3 |  Archive

Archived Code

The code below utilizes a BS2/Board of Education and a Mini Serial Servo Controller II. We are currently updating all of our code to take advantage of the PSC (Parallax Servo Controller).
------[ HexCrawler ]------
Center Legs Test and center all leg servos
HexWalker Walk forward, back, left, and right utilizing ripple and tripod gaits using HiTec servos
HexWalker RF Control the HexCrawler with the Parallax Key chain Tx/Rx
HexWalker_SRF Obstacle avoidance using an SRF04 sonic range finder and the HexWalker Program .
HexTripod Simple Tripod Gait
HexRipple Simple Ripple gait
HexTurn Simple Turn
 
------[ QuadCrawler ]------
QuadHomeLegs Test and center all legs (HiTec servos)
QuadWalker Walk forward, back, left and right (HiTec servos)
QuadWalker_SRF Obstacle avoidance with SRF04 and QuadWalker program (HiTec)
QuadHomeLegs_Futaba Test and center all legs (Futaba servos)
QuadWalker_Futaba Walk forward, back, left and right (Futaba servos)
QuadWalker_S3_SRF0. Obstacle avoidance using a SRF04 mounted on the S3 Tilt Pan integrated wit the QuadWalker program. (Futaba servos)
 
------[ S3 Tilt Pan]------
Center_S3.zip Test and center the S3 servos
CheckDist.bs2 Center the S3 and take distance readings with an SRF04 sonic range finder
lookaround S3 search pattern while displaying distance readings on a debug screen.
 
------[ 3DOF Leg Upgrade]------
HexHomeCrabStyle Test and center and 18 servos
HexCrabStyle Walk forward, back, and like a crab to the left and right.
HexCrabStyleRF Control the HexCrawler 3DOF upgrade with the Parallax Key chain Tx/Rx
HexCrabStyleObAv Obstacle avoidance with an SRF04 and 3DOF on the HexCrawler