Christian Burri / Mbed 2 deprecated autonomousRobotAndroid

Dependencies:   mbed

Fork of autonomousRobotAndroid by Christian Burri

Embed: (wiki syntax)

« Back to documentation index

main.cpp File Reference

main.cpp File Reference

Go to the source code of this file.

Functions

int main ()
 Main function.

Variables

Hallsensor
Hallsensor hallLeft (p18, p17, p16)
 hallsensorLeft object with pin15, pin17 and pin16
Hallsensor hallRight (p27, p28, p29)
 hallsensorLeft object with pin17, pin28 and pin29
Logging & State
state_t s
 Define the struct for the State and the Logging.

Motors and Robot Control

RobotControl robotControl & leftMotor
 robotControl object with leftMotor, rightMotor and the sampling rate for the run method
MaxonESCON leftMotor (p26, p25, p24, p19,&hallLeft)
 leftMotor object with pin26, pin25, pin24, pin19 and hallsensorLeft object
MaxonESCON rightMotor (p23, p22, p21, p20,&hallRight)
 rightMotor object with pin23, pin22, pin21, pin20 and hallsensorRight object

Detailed Description

Definition in file main.cpp.


Function Documentation

MaxonESCON leftMotor ( p26  ,
p25  ,
p24  ,
p19  ,
hallLeft 
)

leftMotor object with pin26, pin25, pin24, pin19 and hallsensorLeft object

int main (  )

Main function.

Start the Programm here.

Check at first the Battery voltage. Starts when the voltage is greater than the min is. start the timer for the Logging to the file and start the Task for logging.

Initialise the ADB subsystem. Set Theta for to go to Startloop.

Runs at first till the Startbutton has pressed.

Sets the acutal value for a fast stop. Close the File PLOTS.txt to read the file with the computer afterwards and draw a diagramm.

Close the File PLOTS.txt to read the file with the computer afterwards and draw a diagramm.

Fast PWM sample for the end.

Definition at line 121 of file main.cpp.

MaxonESCON rightMotor ( p23  ,
p22  ,
p21  ,
p20  ,
hallRight 
)

rightMotor object with pin23, pin22, pin21, pin20 and hallsensorRight object


Variable Documentation

Hallsensor hallLeft(p18, p17, p16)

hallsensorLeft object with pin15, pin17 and pin16

Hallsensor hallRight(p27, p28, p29)

hallsensorLeft object with pin17, pin28 and pin29

RobotControl robotControl& leftMotor

robotControl object with leftMotor, rightMotor and the sampling rate for the run method

Definition at line 90 of file main.cpp.

Define the struct for the State and the Logging.

state object with robotControl, rightMotor, leftMotor, battery and the sampling rate for the run method

Definition at line 101 of file main.cpp.