RCodePlus Device control features |
This page describes lower level device control extensions provided in RCodePlus.
AP_DEVCTL
Device control for setting camera white balance, gain, and shutter speed. Also sets microphone parameters.
AP_DEVCTL prop val
prop = 1, sets camera white balance (1 = inside, 2 = outside, 3 = fluorescent)
prop = 2, sets camera gain (1 = low, 2 = med, 3 = high)
prop = 3, set camera shutter speed (1 = slow, 2 = med, 3 = fast)
prop = 4, sets microphone omni mode (0 = off = unidirectional, 1 = on = omnidirectional).
prop = 5, sets microphone ALC (0 = off, 1 = on = automatic level control)
[does not appear to work]
prop = 6, sets Human Face Detector on/off (0 = off, 1 = on). Eats up CPU cycles.
AP_GETACCEL
The accelerometers can be read with AP_GETACCEL.
AP_GETACCEL varY varX varZ
returns the X, Y and Z values in the 3 variables (all three are needed)
Units are micro-meters per second per second (range +- 2G).
For the ERS-31x, the last "Z" parameter is not set.
AP_VOICEREC, AP_VoiceRec_Result (2.51)
This is an advanced feature for implementing "Name Registration".
AP_VOICEREC vcmdID
inputs:
vcmdID = voice command number
1 = dog's name
0x100 = owner's name
another number over 0x100 = other name
outputs:
When AP_VOICEREC is called, "AP_VoiceRec_Result" is initially set to -1.
The variable will stay at -1 while recording.
When the request is completed, "AP_VoiceRec_Result" is the return code.
Typical values are 1 for complete, 2 for incomplete, 3 for error
AP_VoiceRec_Result will be -1 while recording,
1 if complete, 2 if incomplete
See ObeyCat or Yacky AIBO for sample code.
You should assign extra words from 257 up. When the recognized word is heard, it will be treated like any other voice command (use AU_Voice or AP_Voice_Cmd). The Dog's name returns number 1, the owners name returns number 256. Other extra words should return 257 up.
AP_GETSYNVOICE, AP_SynBite_Mode (2.51)
This is an advanced feature for implementing "What's your name" or mimic mode.TO BE DOCUMENTEDSee the RCR (RCode Runtime) used in ObeyCat or Yacky AIBO for sample code.