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.
Dependents: ISR_Mini-explorer_Rangefinder
Fork of ISR_Mini-explorer by
robot.h File Reference
Go to the source code of this file.
Functions | |
| void | tca9548_select_ch (char ch) |
| Selects the wich infrared to comunicate. | |
| float | read_Infrared (char ch) |
| Get the distance from of the chosen infrared. | |
| void | leftMotor (short int Dir, short int Speed) |
| Sets speed and direction of the left motor. | |
| void | rightMotor (short int Dir, short int Speed) |
| Sets speed and direction of the right motor. | |
| long int | read16_mcp3424 (char addr) |
| Reads adc of the battery. | |
| void | write_mcp3424 (int n_bits, int ch, int gain, char addr) |
| Reads adc of the battery. | |
| float | value_of_Batery () |
| Reads adc of the battery. | |
| static unsigned int | get_distance_left_sensor () |
| Returns left sensor value. | |
| static unsigned int | get_distance_front_sensor () |
| Returns front sensor value. | |
| static unsigned int | get_distance_right_sensor () |
| Returns right sensor value. | |
| void | init_robot_pins () |
| Initializes the necessary robot pins. | |
| void | initRobot (int channel) |
| Initializes all the pins and all the modules necessary. | |
Detailed Description
Definition in file robot.h.
Function Documentation
| static unsigned int get_distance_front_sensor | ( | ) | [static] |
| static unsigned int get_distance_left_sensor | ( | ) | [static] |
| static unsigned int get_distance_right_sensor | ( | ) | [static] |
| void init_robot_pins | ( | ) |
| void initRobot | ( | int | channel ) |
| void leftMotor | ( | short int | Dir, |
| short int | Speed | ||
| ) |
Sets speed and direction of the left motor.
- Parameters:
-
Dir - Direction of movement, 0 for back, or 1 for fron Speed - Percentage of speed of the motor (1..100)
Note: Because of differences in the motors they need to be calibrated, test the robot going front and back at different speeds and see if it makes a straigth line
| long int read16_mcp3424 | ( | char | addr ) |
| float read_Infrared | ( | char | ch ) |
| void rightMotor | ( | short int | Dir, |
| short int | Speed | ||
| ) |
Sets speed and direction of the right motor.
- Parameters:
-
Dir - Direction of movement, 0 for back, or 1 for fron Speed - Percentage of speed of the motor (1..100)
Note: Because of differences in the motors they need to be calibrated, test the robot going front and back at different speeds and see if it makes a straigth line
| void tca9548_select_ch | ( | char | ch ) |
| float value_of_Batery | ( | ) |
Generated on Fri Jul 15 2022 01:53:00 by
1.7.2
