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
BatteryMonitor Class Reference

WALL-E Battery Monitor Class that utilized the ADC to keep record of the current battery voltage to prevent low battery usage and battery life drain. More...

#include <batteryMonitor.h>

Public Member Functions

 BatteryMonitor (ADC_HandleTypeDef *hadc, uint16_t threshold_mV=7000)
 Constructor Function for the Battery Monitor Class.
uint16_t getVoltage_mV ()
 Function allows for the user to retrieve the voltage of the battery.
bool isLow ()

Private Member Functions

uint16_t readVoltageRaw_mV ()
 Function calculates the voltage in mV by reading the ADC and applying the conversion to step up to the appropriate input voltage.

Private Attributes

ADC_HandleTypeDef * hadc
uint16_t threshold_mV

Detailed Description

WALL-E Battery Monitor Class that utilized the ADC to keep record of the current battery voltage to prevent low battery usage and battery life drain.

Constructor & Destructor Documentation

◆ BatteryMonitor()

BatteryMonitor::BatteryMonitor ( ADC_HandleTypeDef * hadc,
uint16_t threshold_mV = 7000 )

Constructor Function for the Battery Monitor Class.

Parameters
hadcADC definition from the STM32 HAL Config
threshold_mVDefault value 7000 for 7V, indicates when battery levels are too low

Member Function Documentation

◆ getVoltage_mV()

uint16_t BatteryMonitor::getVoltage_mV ( )

Function allows for the user to retrieve the voltage of the battery.

Parameters
None
Returns
uint16_t

◆ isLow()

bool BatteryMonitor::isLow ( )

◆ readVoltageRaw_mV()

uint16_t BatteryMonitor::readVoltageRaw_mV ( )
private

Function calculates the voltage in mV by reading the ADC and applying the conversion to step up to the appropriate input voltage.

Returns
uint16_t

Member Data Documentation

◆ hadc

ADC_HandleTypeDef* BatteryMonitor::hadc
private

Private Variable hadc Assigns the hadc ADC typedef fromt he STM32 HAL Definition

◆ threshold_mV

uint16_t BatteryMonitor::threshold_mV
private

Private Variable threshold_mV Assigns the threshold voltage to indicate low voltage


The documentation for this class was generated from the following files: