|
VEX IQ Python API
|
VexIQ controller Python API for Robot Mesh. More...
Classes | |
| class | AnalogSensor |
| Analog Sensor. More... | |
| class | Bumper |
| class | ColorSensor |
| Config Color Sensor: detects color hue or a grayscale value. More... | |
| class | DistanceSensor |
| Config Ultrasonic distance sensor. More... | |
| class | Gyro |
| Config Gyroscope sensor. More... | |
| class | Joystick |
| Config Joystick controller. More... | |
| class | Motor |
| Config Motor with power setting and distance encoder More... | |
| class | NamedColor |
| Enumeration of named colors (for TouchLed and ColorSensor) More... | |
| class | Output |
| Digital output. More... | |
| class | Serial |
| Config Serial port to host. More... | |
| class | TouchLed |
| Config Touch Led: detects touch and shines in various colors More... | |
| class | VisionObject |
| class | VisionSensor |
| Vision Sensor device. More... | |
Functions | |
| def | VisionObjectList () |
| DEPRECATED. More... | |
| def | lcd_write (text, row=1, col=1) |
| Output text to LCD at a specific position. More... | |
| def | battery_voltage () |
| Get brain battery voltage, in volts. More... | |
| def | sound_note (note, octave=None, duration=0.5) |
| Play a musical note on the speaker. More... | |
| def | sound_wave (wave_id, wait_for_end=True) |
| play the wave sample with the given ID [0...15] More... | |
| def | sound_melody (melody) |
| Play a melody form a string in a quasi musical alphabet notiation (cdefgab) More... | |
| def | set_sound_volume (value) |
| set the sound volume [1-4] More... | |
| def | set_sound_effect (type) |
| set the sound effect type [0...15] for subsequent notes played More... | |
| def | is_check_button_pressed () |
| True if the "check" button on the face of the IQ brain is pressed, False otherwise. More... | |
| def | is_up_button_pressed () |
| True if the "up" button on the face of the IQ brain is pressed, False otherwise. More... | |
| def | is_down_button_pressed () |
| True if the "down" button on the face of the IQ brain is pressed, False otherwise. More... | |
Variables | |
| int | UNIT_INCH = 1 |
| int | UNIT_CM = 2 |
| int | UNIT_MM = 3 |
| int | POWER_UNCHANGED_FWD = 255 |
| int | POWER_UNCHANGED_REV = -255 |
VexIQ controller Python API for Robot Mesh.
Copyright 2014 Robot Mesh
| def vexiq.VisionObjectList | ( | ) |
DEPRECATED.
Create a vision object list to pass into visionSensor.objects()
| def vexiq.lcd_write | ( | text, | |
row = 1, |
|||
col = 1 |
|||
| ) |
Output text to LCD at a specific position.
| text | string to write. |
| row | row, 1 to 5. Default 1. |
| col | column, 1 to 25. Default 1. |
| def vexiq.battery_voltage | ( | ) |
Get brain battery voltage, in volts.
| def vexiq.sound_note | ( | note, | |
octave = None, |
|||
duration = 0.5 |
|||
| ) |
Play a musical note on the speaker.
| note | musical note to play: 0=silence/stop, [1-56] or [1-7] if an octave is specified |
| octave | octave of the note [1-7], optional |
| duration | time to play in seconds. None to start playing without blocking. Default 0.5 |
| def vexiq.sound_wave | ( | wave_id, | |
wait_for_end = True |
|||
| ) |
play the wave sample with the given ID [0...15]
| wave_id | sound to play |
| wait_for_end | wait for the sample to finish playing |
| def vexiq.sound_melody | ( | melody | ) |
Play a melody form a string in a quasi musical alphabet notiation (cdefgab)
| melody | string [cdefgab]: musical alphabet for notes, space: pause, +/-: increase/decrease octave of following notes 0-9: set duration of following notes (in 1/8s: 1=eight note...8 = full note) |
| def vexiq.set_sound_volume | ( | value | ) |
set the sound volume [1-4]
| value | volume value [1=low...4=high] |
| def vexiq.set_sound_effect | ( | type | ) |
set the sound effect type [0...15] for subsequent notes played
| type | effect type |
| def vexiq.is_check_button_pressed | ( | ) |
True if the "check" button on the face of the IQ brain is pressed, False otherwise.
| def vexiq.is_up_button_pressed | ( | ) |
True if the "up" button on the face of the IQ brain is pressed, False otherwise.
| def vexiq.is_down_button_pressed | ( | ) |
True if the "down" button on the face of the IQ brain is pressed, False otherwise.
| int vexiq.UNIT_INCH = 1 |
| int vexiq.UNIT_CM = 2 |
| int vexiq.UNIT_MM = 3 |
| int vexiq.POWER_UNCHANGED_FWD = 255 |
| int vexiq.POWER_UNCHANGED_REV = -255 |
1.8.15