MakeBlock Drive Updated Updated library for MakeBlock Ranger

Loading...
Searching...
No Matches
Public Member Functions | List of all members
MeMegaPiProESCMotor Class Reference

Driver for Me Megapipro ESC motor device. More...

`#include <src/MeMegaPiProESCMotor.h>`

## Public Member Functions
| MeMegaPiProESCMotor (void)
| MeMegaPiProESCMotor (uint8_t port)
void | reset (uint8_t port)
void | setpin (uint8_t pwm_pin)
void | init (void)
void | run (int16_t speed)
void | stop (void)

## Detailed Description

Driver for Me Megapipro ESC motor device.

Driver for Me Megapi Pro ESC motor device.

Class: MeMegaPiProESCMotor

Description
  Declaration of Class MeMegaPiProESCMotor

Copyright (C), 2012-2017, MakeBlock

## Constructor & Destructor Documentation

## ◆ MeMegaPiProESCMotor() [1/2]

MeMegaPiProESCMotor::MeMegaPiProESCMotor | ( | void |  | ) |

Alternate Constructor which can call your own function to map the ESC motor to arduino port, no pins are used or initialized here.

Parameters

  [in] | None |

## ◆ MeMegaPiProESCMotor() [2/2]

MeMegaPiProESCMotor::MeMegaPiProESCMotor | ( | uint8_t | port | ) |

Alternate Constructor which can call your own function to map the ESC motor to arduino port

Parameters

  [in] | port | - megapi dc port from PORT_1 to PORT_12

Alternate Constructor which can call your own function to map the ESC motor to arduino port

Parameters

  [in] | port | - megapipro esc port from PORT_1 to PORT_12

## Member Function Documentation

## ◆ init()

void MeMegaPiProESCMotor::init | ( | void |  | ) |

Function
  init

Description
  init ESC motor

Output
  None

Returns
  None

Others
  None

Function
  init

Description
  init esc Motor

Output
  None

Returns
  None

Others
  None

## ◆ reset()

void MeMegaPiProESCMotor::reset | ( | uint8_t | port | ) |

Function
  setpin

Description
  Reset the ESC motor available PIN by megapipro port.

Parameters

  [in] | port | - megapipro esc port from PORT_1 to PORT_12

Output
  None

Returns
  None

Others
  None

Function
  reset

Description
  Reset the ESC motor available PIN by megapi port.

Parameters

  [in] | port | - megapipro esc port from PORT_1 to PORT_12

Output
  None

Returns
  None

Others
  None

## ◆ run()

void MeMegaPiProESCMotor::run | ( | int16_t | speed | ) |

Function
  run

Description
  Control the motor forward or reverse

Parameters

  [in] | speed | - Speed value from 0 to 100

Output
  None

Returns
  None

Others
  None

## ◆ setpin()

void MeMegaPiProESCMotor::setpin | ( | uint8_t | pwm_pin | ) |

Function
  setpin

Description
  Reset the ESC motor available PIN by its arduino port.

Parameters

  [in] | pwm_pin | - arduino port for pwm input(should analog pin)

Output
  None

Returns
  None

Others
  None

## ◆ stop()

void MeMegaPiProESCMotor::stop | ( | void |  | ) |

Function
  stop

Description
  Stop the rotation of the motor

Output
  None

Returns
  None

Others
  None

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

- src/MeMegaPiProESCMotor.h
- src/MeMegaPiProESCMotor.cpp