![]() |
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.
|
#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) |
| #define OV2640_I2C_ADDR 0x60 |
| #define WALL_E_FUNC |
| void Error_Handler | ( | void | ) |
This function is executed in case of error occurrence.
| None |
| void HAL_TIM_PeriodElapsedCallback | ( | TIM_HandleTypeDef * | htim | ) |
| int main | ( | void | ) |
The application entry point.
| int |
| void printToUART | ( | const char * | msg | ) |
| void simpleMovements | ( | ) |
| void SystemClock_Config | ( | void | ) |
System Clock Configuration.
| 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
| void WALL_E_systemCheck | ( | BatteryMonitor & | bat, |
| HCSR04 & | range, | ||
| RomiMotor & | rMotor, | ||
| RomiMotor & | lMotor, | ||
| BNO055 & | imu, | ||
| OV2640Camera & | camera ) |
| 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 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 | ) |
| 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 | ) |