Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of autonomousRobotAndroid by
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.
| 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 |
Generated on Wed Jul 13 2022 04:37:19 by
1.7.2
