|
VEX V5 Python API
|
Public Member Functions | |
| def | __init__ (self, parent) |
| Serial port (wireless or USB connection) More... | |
| def | write (self, data, null_terminate_string=True) |
| Write the data to the serial port. More... | |
| def | read (self, buffer) |
| Read data present on the serial port. More... | |
| def | has_data (self) |
| Check if there is data to be read. More... | |
| def vex.Serial.__init__ | ( | self, | |
| parent | |||
| ) |
Serial port (wireless or USB connection)
| def vex.Serial.write | ( | self, | |
| data, | |||
null_terminate_string = True |
|||
| ) |
Write the data to the serial port.
| data | bytes to send. Type can be:
|
| null_terminate_string | send '\0' at the end if data type is string. Default True. |
| def vex.Serial.read | ( | self, | |
| buffer | |||
| ) |
Read data present on the serial port.
| buffer | pre-allocated bytearray of a fixed length that will be filled with file data. |
| def vex.Serial.has_data | ( | self | ) |
Check if there is data to be read.
Call read to get the data.
1.8.15