Documentation
¶
Index ¶
- Constants
- Variables
- func Close()
- func GetBoard() (boardName string)
- func GetFirmwareVersion() (firmware string)
- func GetHardwareVersion() (hardwareVersion string)
- func GetID() (id string)
- func GetManufacturer() (manufactor string)
- func GetMotorEncoder(port byte) (encoder int32)
- func GetMotorStatus(port byte) (state uint8, power int8, position int32, dps int16)
- func GetSensorValue(port uint) (sensorValue int)
- func OffsetMotorEncoder(port byte, position int32)
- func ReadVoltage3V3() (voltage float32)
- func ReadVoltage5V() (voltage float32)
- func ReadVoltage9V() (voltage float32)
- func ReadVoltageBattery() (voltage float32)
- func ResetAll()
- func ResetMotorEncoder(port byte)
- func SetLed(ledValue byte)
- func SetMotorDPS(port byte, dps int)
- func SetMotorLimits(port byte, power byte, dps int)
- func SetMotorPosition(port byte, position int32)
- func SetMotorPositionKD(port byte, kd byte)
- func SetMotorPositionKP(port byte, kp byte)
- func SetMotorPositionRelative(port byte, degrees int32)
- func SetMotorPower(port byte, power int8)
- func SetSensorType(port byte, sensorType byte)
- func Start()
Constants ¶
View Source
const ( SENSOR_TYPE_NONE = iota SENSOR_TYPE_I2C = iota SENSOR_TYPE_CUSTOM = iota SENSOR_TYPE_TOUCH = iota SENSOR_TYPE_TOUCH_NXT = iota SENSOR_TYPE_TOUCH_EV3 = iota SENSOR_TYPE_NXT_LIGHT_ON = iota SENSOR_TYPE_NXT_LIGHT_OFF = iota SENSOR_TYPE_NXT_COLOR_RED = iota SENSOR_TYPE_NXT_COLOR_GREEN = iota SENSOR_TYPE_NXT_COLOR_BLUE = iota SENSOR_TYPE_NXT_COLOR_FULL = iota SENSOR_TYPE_NXT_COLOR_OFF = iota SENSOR_TYPE_NXT_ULTRASONIC = iota SENSOR_TYPE_EV3_GYRO_ABS = iota SENSOR_TYPE_EV3_GYRO_DPS = iota SENSOR_TYPE_EV3_ABS_DPS = iota SENSOR_TYPE_EV3_COLOR_REFLECTED = iota SENSOR_TYPE_EV3_COLOR_AMBIENT = iota SENSOR_TYPE_EV3_COLOR_COLOR = iota SENSOR_TYPE_EV3_COLOR_RAW_REFLECTED_ = iota SENSOR_TYPE_EV3_COLOR_COLOR_COMPONENTS = iota SENSOR_TYPE_EV3_ULTRASONIC_CM = iota SENSOR_TYPE_EV3_ULTRASONIC_INCHES = iota SENSOR_TYPE_EV3_ULTRASONIC_LISTEN = iota SENSOR_TYPE_EV3_INFRARED_PROXIMITY = iota SENSOR_TYPE_EV3_INFRARED_SEEK = iota SENSOR_TYPE_EV3_INFRARED_REMOTE = iota )
View Source
const ( SENSOR_STATE_VALID_DATA = iota SENSOR_STATE_NOT_CONFIGURED = iota SENSOR_STATE_CONFIGURING = iota SENSOR_STATE_NO_DATA = iota SENSOR_STATE_I2C_ERROR = iota )
View Source
const ( PORT_1 = 1 PORT_2 = 2 PORT_3 = 4 PORT_4 = 8 )
View Source
const ( PORT_A = 1 PORT_B = 2 PORT_C = 4 PORT_D = 8 )
View Source
const MOTOR_FLOAT = -128
Variables ¶
View Source
var BP *spi.Device
Functions ¶
func GetFirmwareVersion ¶
func GetFirmwareVersion() (firmware string)
func GetHardwareVersion ¶
func GetHardwareVersion() (hardwareVersion string)
func GetManufacturer ¶
func GetManufacturer() (manufactor string)
func GetMotorEncoder ¶
func GetMotorStatus ¶
func GetSensorValue ¶
func OffsetMotorEncoder ¶
func ReadVoltage3V3 ¶
func ReadVoltage3V3() (voltage float32)
func ReadVoltage5V ¶
func ReadVoltage5V() (voltage float32)
func ReadVoltage9V ¶
func ReadVoltage9V() (voltage float32)
func ReadVoltageBattery ¶
func ReadVoltageBattery() (voltage float32)
func ResetMotorEncoder ¶
func ResetMotorEncoder(port byte)
func SetMotorDPS ¶
func SetMotorLimits ¶
func SetMotorPosition ¶
func SetMotorPositionKD ¶
func SetMotorPositionKP ¶
func SetMotorPower ¶
func SetSensorType ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.