Commands

Command System

A command system is required to send commands to the vocalizer. The following systems are supported:

Kyber Control System — Support coming soon. Mention Human-Cyborg Relations when purchasing and the Kyber team will generously donate $10 to FIRST Robotics.

DIY — Build your own control system. As a starting point, see the C++ command API developed by Alec Muir.

Commands

Commands can be sent over Serial, UART, or I2C. All commands must be wrapped in a container: <...>

To send multiple commands at once, include them within a single container separated by commas: <...,...>

...or chain multiple containers in a single string: <...><...>

CommandResponseDescription

Stimuli

SH0

Trigger mild happy vocalization

SH1

Trigger extreme happy vocalization

SS0

Trigger mild sad vocalization

SS1

Trigger extreme sad vocalization

SM0

Trigger mild angry vocalization

SM1

Trigger extreme angry vocalization

SC0

Trigger mild scared vocalization

SC1

Trigger extreme scared vocalization

SE

Trigger overload/electrocution vocalization

Muse

M1

Enable muse

M0

Disable muse

MT

Toggle muse

MM

Trigger single musing

MN#

Set minimum gap (seconds) between musings

MX#

Set maximum gap (seconds) between musings

SD WAV

CA####

Play WAV file number 0000-9999 on WAV channel A

CB####

Play WAV file number 0000-9999 on WAV channel B

CA####C####

Play random WAV file between file number 0000-9999 and file number 0000-9999 on WAV channel A

CB####C####

Play random WAV file between file number 0000-9999 and file number 0000-9999 on WAV channel B

Stop

PSV

Stop vocalizer immediately

PSG

Stop vocalizer gracefully (will continue to play until next phoneme on which it is gramatically correct to end a sentence)

PSA

Stop WAV channel A immediately

PSB

Stop WAV channel B immediately

Volume

PVV#

Set vocalizer volume 0-100 (†)

PVA#

Set WAV channel A volume 0-100 (†)

PVB#

Set WAV channel B volume 0-100 (†)

Override

OA0

Disable Canonical mode and enable Improvisational mode (*)

OA1

Enable Canonical mode and disable Improvisational mode (*)

O1

O0

OR

Reset all emotions to 0

OH#

Set Happy emotion to 0-100

OS#

Set Sad emotion to 0-100

OM#

Set Mad emotion to 0-100

OC#

Set Scared emotion to 0-100

Record

---

RRP#

Play from memory slot 0-9

RRS#

Save to memory slot 0-9 (*)

R0

Set strict memory playback (*)

R1

Set organic memory playback (*)

Query

QEH

<QEH,#>

Returns the Happy emotion as an integer from 0-100

QES

<QES,#>

Returns the Sad emotion as an integer from 0-100

QEM

<QEM,#>

Returns the Angry emotion as an integer from 0-100

QEC

<QEC,#>

Returns the Scared emotion as an integer from 0-100

QE

<QE,#,#,#,#>

Returns the value of each emotion as an integer from 0-100 in the following order: happy,sad,mad,scared

QO

<QO,#>

Returns 0 if personality chip override is disabled, or 1 if enabled

QM

<QM,#>

Returns 0 if muse is disabled, or 1 if enabled

QF

<QF,#>

Returns an integer from 0-9999 representing the total number of WAV files detected on the SD

QT

<QT,#>

Returns a float representing the total original duration of the currently playing vocalization, or 0 if no vocalization is currently playing

QPV

<QPV,#>

Returns 0 if the vocalizer is not currently vocalizing, or 1 if it is

QPA

<QPA,#>

Returns an integer from 0-9999 representing the WAV file number currently playing on WAV channel A (or -1 if nothing is playing)

QPB

<QPB,#>

Returns an integer from 0-9999 representing the WAV file number currently playing on WAV channel B (or -1 if nothing is playing)

QVV

<QVV,#>

Returns an integer from 0-100 representing the vocalizer volume

QVA

<QVA,#>

Returns an integer from 0-100 representing WAV channel A volume

QVB

<QVB,#>

Returns an integer from 0-100 representing WAV channel B volume

QD

<QD,#,...,#>

Returns key metrics. Comma separated list with the results of these commands: QEH,QES,QEM,QEC,QO,QM,QF,QT,QPV,QPA,QPB

(*) = Persistently stored in R2D2Vocalizer.txt

(†) = Persistently stored in Config.txt

Command Examples

<SH1> — Trigger extreme happy vocalization.

<CA0025> — Play SD WAV file number 0025 on WAV channel A.

<CB0003C0185> — Play random SD WAV File between file number 0003 and file number 0185 on WAV channel B.

<QEH> — Query Happy emotion. Receive: <QEH,12>

<QE> — Query all emotions. Receive: <QE,4,28,100,68>

Multiple commands can be chained:

<SH1,M1> — Trigger extreme happy vocalization and enable muse.

<SH1><M1> — Alternate syntax for same command as above.

<SM0,QM> — Trigger mild angry vocalization and query muse state. Receive: <QM0>

Last updated