proj_modules package

Submodules

proj_modules.GPS module

class proj_modules.GPS.gpsRead(port, baudrate)

Bases: object

get_position(url=None)
send_request(LonLat, url)

proj_modules.IR_Sensor module

proj_modules.LSM303 module

class proj_modules.LSM303.Compass

Bases: object

get_heading()
get_raw()
hard_iron_bias_x = 8.33426572
hard_iron_bias_y = 38.4854981
hard_iron_bias_z = 0.51834922
soft_iron_bias_xx = 20.097355661177684
soft_iron_bias_xy = 0.20530722218264985
soft_iron_bias_xz = 0.544377527437325
soft_iron_bias_yx = 0.20530722218265313
soft_iron_bias_yy = 20.0365536823096
soft_iron_bias_yz = 1.1208798385500047
soft_iron_bias_zx = 0.5443775274373277
soft_iron_bias_zy = 1.12087983855
soft_iron_bias_zz = 19.24727698802664

proj_modules.MPU6050 module

class proj_modules.MPU6050.MPU6050

Bases: object

MPU_Init()
read_data()
read_raw_data(addr)

proj_modules.Serial module

class proj_modules.Serial.SerialSystem(port, baudrate)

Bases: object

close_serial()
read_serial()
write_serial(message)

proj_modules.WiFi module

class proj_modules.WiFi.Modes

Bases: object

DRIVE = 'D'
SPIN = 'S'
TRANSLATE = 'T'
class proj_modules.WiFi.WiFi(address_url)

Bases: object

get_status(max_retries=3, wait_time=1)

Gets data from mission control. Expected response: {“HB”:int, “IO”:int, “WO”:int, “DM”:char, “CMD”:list}

PARAMS:

max_retries [int]: max number of requests we send to web server before giving up

RETURNS:

JSON data from mission control (if successful. Otherwise None).

read_data(max_retries=3, wait_time=1)

Gets data from mission control. Expected response: {“HB”:int, “IO”:int, “WO”:int, “DM”:char, “CMD”:list}

PARAMS:

max_retries [int]: max number of requests we send to web server before giving up

RETURNS:

JSON data from mission control (if successful. Otherwise None).

send_command(data)

Alias for write_data(..) | Send command to the rover

write_data(data)

Sends data to mission control using an http post request

PARAMS:

data [dict]: something

RETURNS:

None. Just prints out whether or not data was successfully sent or not

proj_modules.WiFi.make_drive_command(mode=None, speed_percent=None, angle_degrees=None)

Create a command to be written to the rover

Parameters

mode: str

Specify the mode in which to interpret command D: Drive, S: Spin, T: Translate Default to “D”

speed_percent: int

Specify the speed as a % of max speed. Can be +-

angle_degree: int

Specify angle the rover should deviate by Look forward to this parameter being modified in the future

proj_modules.old_GPS module

class proj_modules.old_GPS.gpsRead(port, baudrate)

Bases: object

get_position(url=None)
send_request(LonLat, url)

Module contents