14.11.2012 Views

Submitted version of the thesis - Airlab, the Artificial Intelligence ...

Submitted version of the thesis - Airlab, the Artificial Intelligence ...

Submitted version of the thesis - Airlab, the Artificial Intelligence ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

B.1. Microprocessor Code 99<br />

/* Includes ------------------------------------------------------------------*/<br />

/* Exported types ------------------------------------------------------------*/<br />

/* Exported constants --------------------------------------------------------*/<br />

/* Module private variables --------------------------------------------------*/<br />

/* Exported macro ------------------------------------------------------------*/<br />

/* Private functions ---------------------------------------------------------*/<br />

/* Exported functions ------------------------------------------------------- */<br />

void Init_Motors(void);<br />

void Calculate_Order(s16* speed, u8 size);<br />

void Position_Camera(u8 position);<br />

void Set_Directions(u8 Motor1, u8 Motor2, u8 Motor3);<br />

void Stop_Motor(u8 Motor);<br />

void Bumpers(u8 bumper[6]);<br />

void Set_Speed(s16* speed, u8 mod);<br />

void Stop_Servo(void);<br />

void Turn(u8 direction);<br />

#endif /* MOTOR_INIT_H_ */<br />

————–Motor Init.c.——————<br />

/* Standard include ----------------------------------------------------------*/<br />

#include "91x_map.h"<br />

#include "utils.h"<br />

#include "definitions.h"<br />

#include "definitionsLib.h"<br />

#include "CamInt_x24.h"<br />

#include "usb_lib.h"<br />

#include "usb_conf.h"<br />

#include "usb_prop.h"<br />

#include "usb_pwr.h"<br />

#include "usb_config.h"<br />

#include "math.h"<br />

#include "Motor_Init.h"<br />

/* Include <strong>of</strong> o<strong>the</strong>r module interface headers ---------------------------------*/<br />

/* Local includes ------------------------------------------------------------*/<br />

/* Private typedef -----------------------------------------------------------*/<br />

/* Private define ------------------------------------------------------------*/<br />

/* Private macro -------------------------------------------------------------*/<br />

/* Private variables ---------------------------------------------------------*/<br />

u8 control_hit;<br />

u8 servo_position = 0;<br />

u8 servo_flag = 0;<br />

u8 motor1_speed;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!