Wicked Device Motor Shield
Software Library for Wicked Device Motor Shield
Classes | Macros
WickedMotorShield.h File Reference
#include <WProgram.h>
#include <stdint.h>

Go to the source code of this file.

Classes

class  WickedMotorShield
 
class  Wicked_Stepper
 
class  Wicked_DCMotor
 

Macros

#define DIR_CCW   (0)
 
#define DIR_CW   (1)
 
#define BRAKE_OFF   (0)
 
#define BRAKE_HARD   (1)
 
#define BRAKE_SOFT   (2)
 
#define M1   (0)
 
#define M2   (1)
 
#define M3   (2)
 
#define M4   (3)
 
#define M5   (4)
 
#define M6   (5)
 
#define M4_DIR_MASK   (0x80)
 
#define M4_BRAKE_MASK   (0x40)
 
#define M1_DIR_MASK   (0x20)
 
#define M1_BRAKE_MASK   (0x10)
 
#define M2_DIR_MASK   (0x08)
 
#define M2_BRAKE_MASK   (0x04)
 
#define M3_DIR_MASK   (0x02)
 
#define M3_BRAKE_MASK   (0x01)
 
#define M6_DIR_MASK   (0x80)
 
#define M6_BRAKE_MASK   (0x40)
 
#define M5_DIR_MASK   (0x20)
 
#define M5_BRAKE_MASK   (0x10)
 
#define M2_PWM_PIN   (9)
 
#define M3_PWM_PIN   (5)
 
#define M4_PWM_PIN   (10)
 
#define M5_PWM_PIN   (6)
 
#define RCIN1   (1)
 
#define RCIN2   (2)
 
#define SERIAL_CLOCK_PIN   (2)
 
#define SERIAL_LATCH_PIN   (7)
 
#define OPERATION_CLEAR   (0)
 
#define OPERATION_SET   (1)
 
#define OPERATION_NONE   (2)
 
#define USE_ALTERNATE_PINS   (1)
 

Macro Definition Documentation

◆ BRAKE_HARD

#define BRAKE_HARD   (1)

Integer value defining "brake hard".

Definition at line 43 of file WickedMotorShield.h.

◆ BRAKE_OFF

#define BRAKE_OFF   (0)

Integer value defining "brake off".

Definition at line 39 of file WickedMotorShield.h.

◆ BRAKE_SOFT

#define BRAKE_SOFT   (2)

Integer value defining "brake soft".

Definition at line 47 of file WickedMotorShield.h.

◆ DIR_CCW

#define DIR_CCW   (0)

Integer value defining counterclockwise rotation. (Value = 0)

Definition at line 35 of file WickedMotorShield.h.

◆ DIR_CW

#define DIR_CW   (1)

Integer value defining clockwise rotation. (Value = 1)

Definition at line 37 of file WickedMotorShield.h.

◆ M1

#define M1   (0)

Integer value identifying motor M1.

Definition at line 51 of file WickedMotorShield.h.

◆ M1_BRAKE_MASK

#define M1_BRAKE_MASK   (0x10)

Shows location of bit for brake status of motor M1 in WickedMotorShield::first_shift_register.

If M1_BRAKE_MASK bit is zero, brake is set to BRAKE_OFF and M1_DIR_MASK bit indicates direction of rotation. If M1_BRAKE_MASK bit is one, M1_DIR_MASK indicates whether hard brake or soft brake.

There are equivalent macro definitions BRAKE_MASK and DIR_MASK for the other motors (M2, M3, M4, M5, M6).

Definition at line 108 of file WickedMotorShield.h.

◆ M1_DIR_MASK

#define M1_DIR_MASK   (0x20)

Shows location of bit for brake status for motor M1 in WickedMotorShield::first_shift_register.

See M1_BRAKE_MASK

Definition at line 94 of file WickedMotorShield.h.

◆ M2

#define M2   (1)

Integer value identifying motor M2.

Definition at line 55 of file WickedMotorShield.h.

◆ M2_BRAKE_MASK

#define M2_BRAKE_MASK   (0x04)

Shows location of bit for brake status of motor M2 in WickedMotorShield::first_shift_register.

See M1_DIR_MASK and M1_BRAKE_MASK for more information.

Definition at line 122 of file WickedMotorShield.h.

◆ M2_DIR_MASK

#define M2_DIR_MASK   (0x08)

Shows location of bit for direction status of motor M2 in WickedMotorShield::first_shift_register.

See M1_DIR_MASK and M1_BRAKE_MASK for more information.

Definition at line 115 of file WickedMotorShield.h.

◆ M2_PWM_PIN

#define M2_PWM_PIN   (9)

Digital pin used for specfying speed of motor M2.

Definition at line 171 of file WickedMotorShield.h.

◆ M3

#define M3   (2)

Integer value identifying motor M3.

Definition at line 59 of file WickedMotorShield.h.

◆ M3_BRAKE_MASK

#define M3_BRAKE_MASK   (0x01)

Shows location of bit for brake status of motor M3 in WickedMotorShield::first_shift_register.

See M1_DIR_MASK and M1_BRAKE_MASK for more information.

Definition at line 136 of file WickedMotorShield.h.

◆ M3_DIR_MASK

#define M3_DIR_MASK   (0x02)

Shows location of bit for direction status of motor M3 in WickedMotorShield::first_shift_register.

See M1_DIR_MASK and M1_BRAKE_MASK for more information.

Definition at line 129 of file WickedMotorShield.h.

◆ M3_PWM_PIN

#define M3_PWM_PIN   (5)

Digital pin used for specifying speed of motor M3.

Definition at line 175 of file WickedMotorShield.h.

◆ M4

#define M4   (3)

Integer value identifying motor M4.

Definition at line 63 of file WickedMotorShield.h.

◆ M4_BRAKE_MASK

#define M4_BRAKE_MASK   (0x40)

Shows location of bit for brake status of motor M4 in WickedMotorShield::shift_register_1.

See M1_DIR_MASK and M1_BRAKE_MASK for more information.

Definition at line 87 of file WickedMotorShield.h.

◆ M4_DIR_MASK

#define M4_DIR_MASK   (0x80)

Shows location of bit for direction status of motor M4 in WickedMotorShield::shift_register_1.

See M1_DIR_MASK and M1_BRAKE_MASK for more information.

Definition at line 80 of file WickedMotorShield.h.

◆ M4_PWM_PIN

#define M4_PWM_PIN   (10)

Digital pin used for specifying speed of motor M4.

Definition at line 179 of file WickedMotorShield.h.

◆ M5

#define M5   (4)

Intger value identifying motor M5.

Definition at line 67 of file WickedMotorShield.h.

◆ M5_BRAKE_MASK

#define M5_BRAKE_MASK   (0x10)

Shows location of bit for brake status of motor M5 in WickedMotorShield::second_shift_register.

See M1_DIR_MASK and M1_BRAKE_MASK for more information.

Definition at line 166 of file WickedMotorShield.h.

◆ M5_DIR_MASK

#define M5_DIR_MASK   (0x20)

Shows location of bit for direction status of motor M5 in WickedMotorShield::second_shift_register.

See M1_DIR_MASK and M1_BRAKE_MASK for more information.

Definition at line 159 of file WickedMotorShield.h.

◆ M5_PWM_PIN

#define M5_PWM_PIN   (6)

Digital pin used for specifying speed of motor M5.

Definition at line 183 of file WickedMotorShield.h.

◆ M6

#define M6   (5)

Integer value identifying motor M6.

Definition at line 71 of file WickedMotorShield.h.

◆ M6_BRAKE_MASK

#define M6_BRAKE_MASK   (0x40)

Shows location of bit for brake status of motor M6 in WickedMotorShield::second_shift_register.

See M1_DIR_MASK and M1_BRAKE_MASK for more information.

Definition at line 152 of file WickedMotorShield.h.

◆ M6_DIR_MASK

#define M6_DIR_MASK   (0x80)

Shows location of bit for direction status of motor M6 in WickedMotorShield::second_shift_register.

See M1_DIR_MASK and M1_BRAKE_MASK for more information.

Definition at line 145 of file WickedMotorShield.h.

◆ OPERATION_CLEAR

#define OPERATION_CLEAR   (0)

Definition at line 191 of file WickedMotorShield.h.

◆ OPERATION_NONE

#define OPERATION_NONE   (2)

Definition at line 193 of file WickedMotorShield.h.

◆ OPERATION_SET

#define OPERATION_SET   (1)

Definition at line 192 of file WickedMotorShield.h.

◆ RCIN1

#define RCIN1   (1)

Definition at line 185 of file WickedMotorShield.h.

◆ RCIN2

#define RCIN2   (2)

Definition at line 186 of file WickedMotorShield.h.

◆ SERIAL_CLOCK_PIN

#define SERIAL_CLOCK_PIN   (2)

Definition at line 188 of file WickedMotorShield.h.

◆ SERIAL_LATCH_PIN

#define SERIAL_LATCH_PIN   (7)

Definition at line 189 of file WickedMotorShield.h.

◆ USE_ALTERNATE_PINS

#define USE_ALTERNATE_PINS   (1)

Definition at line 195 of file WickedMotorShield.h.