VEXcode Doxygen
Public Member Functions | List of all members
vex::electromagnet Class Reference

Use the distance class to control the distance sensor. More...

#include <vex_electromag.h>

Inheritance diagram for vex::electromagnet:
vex::device

Public Member Functions

 electromagnet (int32_t index)
 Creates a new inertial object on the port specified. More...
 
bool installed ()
 
int32_t value ()
 
void setPower (uint32_t power)
 
void pickup (void)
 Energize the electromagnet for a brief time to pickup an object.
 
void pickup (double time, timeUnits units=timeUnits::msec)
 Energize the electromagnet for a given time with default power to pickup an object.
 
void pickup (double time, timeUnits units, uint32_t power)
 Energize the electromagnet for a given time with given power to pickup an object.
 
void drop (void)
 Energize the electromagnet for a brief time to drop an object.
 
void drop (double time, timeUnits units=timeUnits::msec)
 Energize the electromagnet for given time with default power to drop an object.
 
void drop (double time, timeUnits units, uint32_t power)
 Energize the electromagnet for given time with given power to drop an object.
 
double temperature (temperatureUnits units=temperatureUnits::celsius)
 Gets the temperature of the electromagnet.
 
- Public Member Functions inherited from vex::device
 device (int32_t index)
 
V5_DeviceType type ()
 
int32_t index ()
 
void init (int32_t index)
 
uint32_t timestamp ()
 

Additional Inherited Members

- Protected Attributes inherited from vex::device
int32_t _index
 
int32_t _threadID
 

Detailed Description

Use the distance class to control the distance sensor.

Constructor & Destructor Documentation

◆ electromagnet()

vex::electromagnet::electromagnet ( int32_t  index)

Creates a new inertial object on the port specified.

Parameters
indexThe port index for this inertial. The index is zero-based.

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