WALL-E Version 1.0
The "WALL-E" Project is a ME 507 quarter term project inspired to recreate the robot WALL-E. The WALL-E robot is a fully 3D printed robot with modified components in order to fit the needs of the chosen peripherals and electronics. WALL-E contains a custom made PCB which is housed in the main body of WALL-E. WALL-E's peripherals and components include 2 pololu Romi Motors with encoders, 4 MG90s servos, BNO055 IMU, and a OV2640 ArduCam camera. The objective of WALL-E is to scan the surrounding area for the closest object to it. Once that object is detected, WALL-E drives up to the object, attempts to pick up or hold the object and detect the color of the object.
Loading...
Searching...
No Matches
main.cpp File Reference
#include "main.h"
#include "batteryMonitor.h"
#include "WALLE_FSM.h"
#include <string.h>
#include <unistd.h>
#include <stdio.h>

Macros

#define WALL_E_FUNC
#define OV2640_I2C_ADDR   0x60

Functions

void SystemClock_Config (void)
 System Clock Configuration.
void WALL_E_systemCheck (BatteryMonitor &, HCSR04 &, RomiMotor &, RomiMotor &, BNO055 &, OV2640Camera &)
void printToUART (const char *msg)
void simpleMovements ()
int main (void)
 The application entry point.
void HAL_TIM_PeriodElapsedCallback (TIM_HandleTypeDef *htim)
void Error_Handler (void)
 This function is executed in case of error occurrence.

Variables

ADC_HandleTypeDef hadc1
I2C_HandleTypeDef hi2c1
SPI_HandleTypeDef hspi1
TIM_HandleTypeDef htim1
TIM_HandleTypeDef htim2
TIM_HandleTypeDef htim3
TIM_HandleTypeDef htim4
TIM_HandleTypeDef htim5
UART_HandleTypeDef huart2
RomiMotor rightMotor (GPIOA, EN_Right_Pin, GPIOB, DIR_Right_Pin, GPIOB, SL_Right_Pin)
RomiMotor leftMotor (GPIOC, EN_Left_Pin, GPIOB, DIR_Left_Pin, GPIOC, SL_Left_Pin)

Macro Definition Documentation

◆ OV2640_I2C_ADDR

#define OV2640_I2C_ADDR   0x60

◆ WALL_E_FUNC

#define WALL_E_FUNC

Function Documentation

◆ Error_Handler()

void Error_Handler ( void )

This function is executed in case of error occurrence.

Return values
None

◆ HAL_TIM_PeriodElapsedCallback()

void HAL_TIM_PeriodElapsedCallback ( TIM_HandleTypeDef * htim)

◆ main()

int main ( void )

The application entry point.

Return values
int

◆ printToUART()

void printToUART ( const char * msg)

◆ simpleMovements()

void simpleMovements ( )

◆ SystemClock_Config()

void SystemClock_Config ( void )

System Clock Configuration.

Return values
None

Configure the main internal regulator output voltage

Initializes the RCC Oscillators according to the specified parameters in the RCC_OscInitTypeDef structure.

Initializes the CPU, AHB and APB buses clocks

◆ WALL_E_systemCheck()

void WALL_E_systemCheck ( BatteryMonitor & bat,
HCSR04 & range,
RomiMotor & rMotor,
RomiMotor & lMotor,
BNO055 & imu,
OV2640Camera & camera )

Variable Documentation

◆ hadc1

ADC_HandleTypeDef hadc1

◆ hi2c1

I2C_HandleTypeDef hi2c1

◆ hspi1

SPI_HandleTypeDef hspi1

◆ htim1

TIM_HandleTypeDef htim1

◆ htim2

TIM_HandleTypeDef htim2

◆ htim3

TIM_HandleTypeDef htim3

◆ htim4

TIM_HandleTypeDef htim4

◆ htim5

TIM_HandleTypeDef htim5

◆ huart2

UART_HandleTypeDef huart2

◆ leftMotor

RomiMotor leftMotor(GPIOC, EN_Left_Pin, GPIOB, DIR_Left_Pin, GPIOC, SL_Left_Pin) ( GPIOC ,
EN_Left_Pin ,
GPIOB ,
DIR_Left_Pin ,
GPIOC ,
SL_Left_Pin  )

◆ rightMotor

RomiMotor rightMotor(GPIOA, EN_Right_Pin, GPIOB, DIR_Right_Pin, GPIOB, SL_Right_Pin) ( GPIOA ,
EN_Right_Pin ,
GPIOB ,
DIR_Right_Pin ,
GPIOB ,
SL_Right_Pin  )