Access this view through device.brain.
State views
isRunningProgram and activeProgram
battery, button, and settings
cpu0Version, cpu1Version, and systemVersion
isAvailable and uniqueId
Operations
getValue() and setValue()
listFiles(), readFile(), writeFile(), removeFile(), and removeAllFiles()
listProgram() and uploadProgram()
setActiveProgram(slot), setMatchMode(mode), and the lower-level
runProgram(slot)/stopProgram() aliases for program and competition
state. Each returns Ok(undefined) on acknowledgement or
Err(VexSerialError) on NACK, timeout, or disconnect.
captureScreen()
uploadFirmware()
uploadFirmware() downloads and writes VEXos components. Loss of power,
incompatible firmware, or interrupted communication can leave the device
unusable. Keep firmware updates out of normal application flows.
Program control
activeProgram is read-only state. Use await setActiveProgram(slot) to load
slots 1 through 8 and await setActiveProgram(0) to stop the running program.
The method returns Err(VexSerialError) when the device is disconnected or
does not acknowledge the command.
View source