All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
clawbot.c File Reference

Clawbot demo code. More...

#include <stdlib.h>
#include "ch.h"
#include "hal.h"
#include "vex.h"
#include "smartmotor.h"
#include "robotc_glue.h"
#include "clawbot.h"

Macros

#define MotorDriveR   kVexMotor_1
 
#define MotorArm   kVexMotor_8
 
#define MotorClaw   kVexMotor_9
 
#define MotorDriveL   kVexMotor_10
 
#define armPot   kVexAnalog_1
 
#define clawPot   kVexAnalog_2
 
#define ARM_UPPER_LIMIT   2000
 
#define ARM_LOWER_LIMIT   600
 
#define ARM_PRESET_H   2000
 
#define ARM_PRESET_L   650
 
#define CLAW_OPEN_HIGH_SPEED   80
 
#define CLAW_CLOSE_HIGH_SPEED   -80
 
#define CLAW_OPEN_LOW_SPEED   20
 
#define CLAW_CLOSE_LOW_SPEED   -15
 

Enumerations

enum  clawCommand { kClawNoCommand = 0, kClawOpenCommand, kClawCloseCommand, kClawStopCommand }
 

Functions

void DriveSystemArcadeDrive (short forward, short turn)
 
task DriveTask (void *arg)
 
task ArmPidController (void *arg)
 
task ClawController (void *arg)
 
task ManualArmClawTask (void *arg)
 
void vexUserSetup ()
 
void vexUserInit ()
 
msg_t vexAutonomous (void *arg)
 
msg_t vexOperator (void *arg)
 

Variables

clawCommand clawCmd = kClawNoCommand
 

Detailed Description

Clawbot demo code.

Macro Definition Documentation

#define MotorDriveR   kVexMotor_1
Examples:
clawbot.c.
#define MotorArm   kVexMotor_8
Examples:
clawbot.c.
#define MotorClaw   kVexMotor_9
Examples:
clawbot.c.
#define MotorDriveL   kVexMotor_10
Examples:
clawbot.c.
#define armPot   kVexAnalog_1
Examples:
clawbot.c.
#define clawPot   kVexAnalog_2
#define ARM_UPPER_LIMIT   2000
Examples:
clawbot.c.
#define ARM_LOWER_LIMIT   600
Examples:
clawbot.c.
#define ARM_PRESET_H   2000
Examples:
clawbot.c.
#define ARM_PRESET_L   650
Examples:
clawbot.c.
#define CLAW_OPEN_HIGH_SPEED   80
Examples:
clawbot.c.
#define CLAW_CLOSE_HIGH_SPEED   -80
Examples:
clawbot.c.
#define CLAW_OPEN_LOW_SPEED   20
Examples:
clawbot.c.
#define CLAW_CLOSE_LOW_SPEED   -15
Examples:
clawbot.c.

Enumeration Type Documentation

Enumerator
kClawNoCommand 
kClawOpenCommand 
kClawCloseCommand 
kClawStopCommand 
Examples:
clawbot.c.

Function Documentation

void DriveSystemArcadeDrive ( short  forward,
short  turn 
)
Examples:
clawbot.c.
task DriveTask ( void *  arg)
Examples:
clawbot.c.
task ArmPidController ( void *  arg)
Examples:
clawbot.c.
task ClawController ( void *  arg)
Examples:
clawbot.c.
task ManualArmClawTask ( void *  arg)
Examples:
clawbot.c.
void vexUserSetup ( void  )
void vexUserInit ( void  )
msg_t vexAutonomous ( void *  arg)
msg_t vexOperator ( void *  arg)

Variable Documentation

Examples:
clawbot.c.