Inherits from LEService : NSObject
Declared in LEMotor.h

Overview

This service allows for controlling a simple motor

Properties

direction

The current running direction of the motor

@property (readonly) LEMotorDirection direction

Discussion

The current running direction of the motor

Declared In

LEMotor.h

isBraking

YES if the motor is currently braking (not running)

@property (readonly) BOOL isBraking

Discussion

YES if the motor is currently braking (not running)

Declared In

LEMotor.h

isDrifting

YES if the motor is currently drifting / floating. When floating the motor axis can be turned without resistance.

@property (readonly) BOOL isDrifting

Discussion

YES if the motor is currently drifting / floating. When floating the motor axis can be turned without resistance.

Declared In

LEMotor.h

power

The power the motor is currently running with (0 if braking of drifting).

@property (readonly) NSUInteger power

Discussion

The power the motor is currently running with (0 if braking of drifting).

Declared In

LEMotor.h

Instance Methods

brake

Send a command to stop (brake) the motor

- (void)brake

Discussion

Send a command to stop (brake) the motor

Declared In

LEMotor.h

drift

Send a command to stop (drift/float) the motor

- (void)drift

Discussion

Send a command to stop (drift/float) the motor

Declared In

LEMotor.h

runInDirection:power:

Send a command to run the motor at a given power in a given direction. The minimum speed is 0 and the maximum speed is 100.

- (void)runInDirection:(LEMotorDirection)direction power:(NSUInteger)power

Parameters

direction

The direction to run the motor

power

The power to run the motor with.

Discussion

Send a command to run the motor at a given power in a given direction. The minimum speed is 0 and the maximum speed is 100.

Declared In

LEMotor.h