Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mathieu52/motor

An arduino library for motor control
https://github.com/mathieu52/motor

Last synced: 9 days ago
JSON representation

An arduino library for motor control

Awesome Lists containing this project

README

        

# Summary

Members | Descriptions
--------------------------------|---------------------------------------------
`class `[`Motor`](#class_motor) | Control motors

# class `Motor`

Control motors

## Summary

Members | Descriptions
--------------------------------|---------------------------------------------
`public unsigned int `[`speed`](#class_motor_1a3f35039a81dcd562a8457b6329ff7b3d)`() const` | The speed of the motor (0 - 255)
`public bool `[`direction`](#class_motor_1ac37a8742ac9834419fe372cac5d51bb6)`() const` | The direction of the motor (true : Forward, false : Backward)
`public `[`Motor`](#class_motor_1a4c872c4ed2601b075affa6b113fee267)`(const unsigned int forwardPin,const unsigned int backwardPin,const unsigned throttlePin)` | Contructor of [Motor](#class_motor).
`public void `[`control`](#class_motor_1a2efba88aedaeaab3280432b8bbe8d874)`(int throttle)` | Throttle the [Motor](#class_motor) using integer value between -255 and 255.
`public void `[`reverse`](#class_motor_1a1e1cfdd2808f7cb6a3816b8089e135db)`()` | Reverse the [Motor](#class_motor) direction.
`public void `[`stop`](#class_motor_1a015fd5308d4d27e5dcf7f9ea3d5c03f6)`()` | Stops the [Motor](#class_motor).
`public void `[`setDirection`](#class_motor_1a20f404b9f19e3bd9b24f65cfa093da8c)`(boolean direction)` | Change the [Motor](#class_motor) direction.
`public void `[`setSpeed`](#class_motor_1a52629377895ffd22fdd60f648cb86f1a)`(unsigned int speed)` | Change the [Motor](#class_motor) speed.

## Members

#### `public unsigned int `[`speed`](#class_motor_1a3f35039a81dcd562a8457b6329ff7b3d)`() const`

The speed of the motor (0 - 255)

#### `public bool `[`direction`](#class_motor_1ac37a8742ac9834419fe372cac5d51bb6)`() const`

The direction of the motor (true : Forward, false : Backward)

#### `public `[`Motor`](#class_motor_1a4c872c4ed2601b075affa6b113fee267)`(const unsigned int forwardPin,const unsigned int backwardPin,const unsigned throttlePin)`

Contructor of [Motor](#class_motor).
#### Parameters
* `forwardPin` : forward pin of the motor (forward direction control)

* `backwardPin` : backward pin of the motor (backward direction control)

* `throttlePin` : throttle pin of the motor (throttle control)

#### `public void `[`control`](#class_motor_1a2efba88aedaeaab3280432b8bbe8d874)`(int throttle)`

Throttle the [Motor](#class_motor) using integer value between -255 and 255.
#### Parameters
* `throttle` : Integer between -255 and 255 (-255 : 100% backward, 255 : 100% forward).

#### `public void `[`reverse`](#class_motor_1a1e1cfdd2808f7cb6a3816b8089e135db)`()`

Reverse the [Motor](#class_motor) direction.

#### `public void `[`stop`](#class_motor_1a015fd5308d4d27e5dcf7f9ea3d5c03f6)`()`

Stops the [Motor](#class_motor).

#### `public void `[`setDirection`](#class_motor_1a20f404b9f19e3bd9b24f65cfa093da8c)`(boolean direction)`

Change the [Motor](#class_motor) direction.
#### Parameters
* `direction` : Boolean representing the new direction (true : Forward, false : Backward)

#### `public void `[`setSpeed`](#class_motor_1a52629377895ffd22fdd60f648cb86f1a)`(unsigned int speed)`

Change the [Motor](#class_motor) speed.
#### Parameters
* `speed` : Integer between 0 and 255 (-255 : Slowest, 255 : Fastest).

Generated by [Moxygen](https://sourcey.com/moxygen)