Module eddiebot_driver
[frames] | no frames]

Module eddiebot_driver

source code


Author: tang.tiong.yew@gmail.com (Tang Tiong Yew)

Classes
  DriverError
  SerialCommandInterface
A higher-level wrapper around PySerial specifically designed for use with Parallax Eddie Propeller Board.
  Eddiebot
Represents a Eddiebot robot.
Variables
  EDDIE_OPCODES = dict(start= '', baud= '', control= '', safe= '...
  REMOTE_OPCODES = {129: 'left', 130: 'forward', 131: 'right', 1...
  BAUD_RATES = 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 2...
  CHARGING_STATES = 'not-charging', 'charging-recovery', 'chargi...
  OI_MODES = 'off', 'passive', 'safe', 'full'
  WHEEL_DROP_CASTER = 0x10
  WHEEL_DROP_LEFT = 0x08
  WHEEL_DROP_RIGHT = 0x04
  BUMP_LEFT = 0x02
  BUMP_RIGHT = 0x01
  OVERCURRENTS_DRIVE_LEFT = 0x10
  OVERCURRENTS_DRIVE_RIGHT = 0x08
  OVERCURRENTS_MAIN_BRUSH = 0x04
  OVERCURRENTS_VACUUM = 0x02
  OVERCURRENTS_SIDE_BRUSH = 0x01
  BUTTON_POWER = 0x08
  BUTTON_SPOT = 0x04
  BUTTON_CLEAN = 0x02
  BUTTON_MAX = 0x01
  SENSOR_GROUP_PACKET_LENGTHS = {0: 26, 1: 10, 2: 6, 3: 10, 4: 1...
  RADIUS_TURN_IN_PLACE_CW = -2000
  RADIUS_TURN_IN_PLACE_CCW = 2000
  RADIUS_STRAIGHT = 32768
  RADIUS_MAX = 2000
  VELOCITY_MAX = 127
  VELOCITY_SLOW = int(VELOCITY_MAX* 0.10)
  VELOCITY_FAST = int(VELOCITY_MAX* 0.66)
  PWM_RATIO_FORWARD_MAX = 127
  PWM_RATIO_BACKWARD_MAX = -127
  MAX_WHEEL_SPEED = 70
  WHEEL_SEPARATION = 260
  SERIAL_TIMEOUT = 2
  START_DELAY = 5
  BAUDRATE = 115200
Variables Details

EDDIE_OPCODES

Value:
dict(start= '', baud= '', control= '', safe= '', full= '', power= '', \
spot= '', clean= '', max= '', drive= 'GO', motors= 'SV', leds= '', son\
g= '', play= '', sensors= '', force_seeking_dock= '', soft_reset= '', \
low_side_drivers= '', play_song= '', pwm_low_side_drivers= '', direct_\
drive= 'GO', digital_outputs= '', stream= '', query_list= '', pause_re\
sume_stream= '', send_ir= '', script= '', play_script= '', show_script\
= '', wait_time= '', wait_distance= '', wait_angle= '', wait_event= ''\
,)

REMOTE_OPCODES

Value:
{129: 'left', 130: 'forward', 131: 'right', 132: 'spot', 133: 'max', 1\
34: 'small', 135: 'medium', 136: 'large', 136: 'clean', 137: 'pause', \
138: 'power', 139: 'arc-left', 140: 'arc-right', 141: 'drive-stop', 14\
2: 'send-all', 143: 'seek-dock', 240: 'reserved', 242: 'force-field', \
244: 'green-buoy', 246: 'green-buoy-and-force-field', 248: 'red-buoy',\
 250: 'red-buoy-and-force-field', 252: 'red-buoy-and-green-buoy', 254:\
 'red-buoy-and-green-buoy-and-force-field', 255: 'none',}

BAUD_RATES

Value:
300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, 1\
15200

CHARGING_STATES

Value:
'not-charging', 'charging-recovery', 'charging', 'trickle-charging', '\
waiting', 'charging-error'

SENSOR_GROUP_PACKET_LENGTHS

Value:
{0: 26, 1: 10, 2: 6, 3: 10, 4: 14, 5: 12, 6: 52, 100: 80}