ev3

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const CharHeight int = 24
View Source
const CharWidth int = 11
View Source
const LCDByteLength = 91136
View Source
const LCDHeight = 128
View Source
const LCDWidth = 178

Variables

View Source
var FontMap map[rune][]RuneCoord

Bool list is row first

View Source
var LCD = newLcd()

Functions

func FontListToCoord

func FontListToCoord(index int) (x int, y int)

func NewColorSensor

func NewColorSensor(port ev3lib.EV3Port) (*ev3lib.ColorSensor, error)

NewColorSensor creates a new color sensor with the provided port. Defaults calibration values of minReflect to 0, and maxReflect to 1.

func NewEV3

func NewEV3() *ev3lib.EV3Brick

func NewEV3MainMenu

func NewEV3MainMenu(ev3 *ev3lib.EV3Brick, m *ev3lib.Menu) *ev3lib.MainMenu

func NewGyroSensor

func NewGyroSensor(port ev3lib.EV3Port, inverted bool) (*ev3lib.GyroSensor, error)

NewGyroSensor creates a new gyro sensor with the provided port. Set inverted to true if arrow markings on the gyro are facing down.

func NewInfraredSensor

func NewInfraredSensor(port ev3lib.EV3Port) (*ev3lib.InfraredSensor, error)

NewInfraredSensor creates a new infrared sensor from the provided port.

func NewLargeMotor

func NewLargeMotor(port ev3lib.EV3Port) (*ev3lib.Motor, error)

func NewMediumMotor

func NewMediumMotor(port ev3lib.EV3Port) (*ev3lib.Motor, error)

func NewTouchSensor

func NewTouchSensor(port ev3lib.EV3Port) (*ev3lib.TouchSensor, error)

NewTouchSensor creates a new touch sensor on the provided port.

func NewUltrasonicSensor

func NewUltrasonicSensor(port ev3lib.EV3Port) (*ev3lib.UltrasonicSensor, error)

NewUltrasonicSensor creates a new ultrasonic sensor on the provided port.

func StopAllMotors

func StopAllMotors()

Types

type EV3MainMenu

type EV3MainMenu struct {
	// contains filtered or unexported fields
}

func (*EV3MainMenu) CancelRun

func (e *EV3MainMenu) CancelRun() bool

func (*EV3MainMenu) Display

func (e *EV3MainMenu) Display(menu *ev3lib.Menu, command int, page int, running bool)

func (*EV3MainMenu) Exit

func (e *EV3MainMenu) Exit() bool

func (*EV3MainMenu) NextCommand

func (e *EV3MainMenu) NextCommand() bool

func (*EV3MainMenu) NextPage

func (e *EV3MainMenu) NextPage() bool

func (*EV3MainMenu) PreviousCommand

func (e *EV3MainMenu) PreviousCommand() bool

func (*EV3MainMenu) PreviousPage

func (e *EV3MainMenu) PreviousPage() bool

func (*EV3MainMenu) RunSelected

func (e *EV3MainMenu) RunSelected() bool

func (*EV3MainMenu) SetCommand

func (e *EV3MainMenu) SetCommand() (bool, int)

func (*EV3MainMenu) SetPage

func (e *EV3MainMenu) SetPage() (bool, int)

type RuneCoord

type RuneCoord struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL