Home | Computer Vision Training | Videos | Downloads | Robot Gallery | Linux | About me
Click Here to Goto Robotics and Software blogspot
| My Contact Information: | Eric Gregori | Email For RobotSee Questions | Email For Freescale Questions |
| RobotVisionToolkit News/Updates Date: 05/23/09 |
Added Joystick support via a joystick dll. Added additional operators, complex expression support, array's, enum/const, and interrupt support to the RobotSee Interpreter. Added scripts to test/demonstrate various Interpreter commands. Updated docs to reflect changes in math commands, and additional comands/arrays. | ||||||||||
| Currently Supported Features: |
|
RobotVisionToolkit with RobotSee Overview pdf
Download Latest Alpha Version of the RobotVisionToolkit with RobotSee
RobotSee Keywords – 05/18/09
Eric Gregori
Variables – testarray.see
global( variable_name ) - Creates a global variable
local( variable_name ) - Creates a local variable within a subroutine
array( variable_name, size ) - Creates a global variable array of integers
access variables just like in c
var[0] = 100 var[24] = 50
array size only limited by memory
enum( name, const1, const2, const3 const4, const5, const6, const7, ... )
- Creates a initialized array of constants
Name is the variable name
And const 1-n, are constants
This is equivalent to: array( name, n )
Name[0] = const1
Name[1] = const2
Name[n-1] = constn
int const( name, index ) - Reads a array ( name ) at index
This is equivilant to: name[index]
Operators – testoperators.see
+ addition 1+1 = 2
- Subtraction 1-1 = 0
* multiplication 2*1 = 2
/ division 100/10 = 10
& bitwise and 0xaa&0xf0 = a0
| bitwise or 0xaa|0x55 = ff
= assignment result=5 = 5
> greater 100>5 = 1
< less then 100<5 = 0
+= addition assignment result = 100 result+=5 = 105
-= subtraction assignment result = 105 result-=5 = 100
*= multiplication assignment result = 100 result*=5 = 500
/= division assignment result = 500 result/=5 = 100
&= bitwise and assignment result = 64 result&=5 = 4
|= bitwise or assignment result = 4 result|=5 = 5
== equal comparison 100==5 = 0
!= not equal comparison 100!=5 = 1
&& logical and 100>5&&100>5 = 1
100>5&&100<5 = 0
100<5&&100>5 = 0
|| logical or 100>5||100>5 = 1
100>5||100<5 = 1
100<5||100>5 = 1
100<5||100<5 = 0
Controlling Program Flow – testloops.see
while( conditional ) .... wend()
for( assignment ) ... next( conditional )
for( assignment ) ... next( expression, conditional )
if( conditional ) ... endif()
if( conditional ) ... else() ... endif()
switch( expression ) ... case C: ... break() ... default: ... endswitch()
switch( expression ) ... case C: ... break() ... endswitch()
switch( expression ) ... case C: ... endswitch()
goto(label)
gosub( label, return var, expression, expression, ..... )
gosub( label, return var )
return( expression )
end()
Multi-Tasking
createtask( ".see path/filename" ) - Creates another interpreter instance and loads
it with the SEE program specified.
int mutex( index ) - Variables used to communicate between instances
int mutex( index, expression ) - Variables used to communicate between instances
Logical
int and( int, mask ) - returns variable and mask
int or( int, mask ) - returns variable or mask
int rightshift( int, shift ) - shifts variable right
int leftshift( int, shift ) - shifts variable left
Time – testtime.see
delay( ms ) - delay for milliseconds
int getms() - Get milliseconds since execution started
int time( 0 ) - returns time in seconds since UTC 1/1/70
int time( 1 ) - returns 0xWWHHMMSS where: W=weekday, H=hour, M=minute, S=second
int time( 2 ) - returns 0xYYDDMMOO where: Y=year, D=Day in year,
M=Month, O=Day Of Month
Math - testmath.see
srand( seed ) - Seed the random number generator
int rand( min, max ) - Returns a random number between min and max
int atanto( mult, div, int, int ) - returns (mult*180*atanto( int/div, int/div ))/pi
int sqrt( mult, int ) - returns mult * sqrt( int )
int asin( mult, div, int ) - returns (mult * 180 * asin( int/div ))/pi
int acos( mult, div, int ) - returns (mult * 180 * acos( int/div ))/pi
int atan( mult, div, int ) - returns (mult * 180 * atan( int/div ))/pi
int tan( mult, div, int ) - returns (mult * tan( ((pi*int)/div )/180 )
int sin( mult, div, int ) - returns (mult * sin( ((pi*int)/div )/180 )
int cos( mult, div, int ) - returns (mult * cos( ((pi*int)/div )/180 )
int abs( int ) - returns abs( int )
Serial
int serpurge( port ) - Purge the serial port
int serout( port, purge, data ) - Send Data out serial port
int seropen( port, baud ) - Open the serial port
int serwait( port, "string", timeout ) - Wait for "string" on serial port
int sergethexbyte( port, variable, timeout ) - Read and convert hex data from serial
port
File I/O – testfileio.see
fileprint( "string", expression, "string %x", expression ) - print data to file
fileopen( "filename" ) - open a file
fileclose() - close a file
Applications Interface
int appget( tag, data ) - Get data from Application Interface
int appflush() - Flush the Application Interface
int appput( tag, data ) - Send data to Application Interface
Sound – testsound.see
soundplay( "filename of sound to play" ) - Play a sound file once ( done in background )
soundloop( "filename of sound to play" ) - Loop a sound file ( done in background )
soundstop( ) - Stop current sound playback
Misc
print( "string", expression, "string %x", expression ) - print to console
debug( level ) - sets debug level for interpreter testing
verbose( level ) - sets interpreter console verbose mode level
int loaddll( "dll_path_filename.dll" ) - Loads a language Extension DLL
int version() - Returns Interpreter Revision Number
Interrupts – testinterrupts.see
int interrupts( option ) - interrupts(0) - disable all
interrupts(1) - enable all
int interadd( label ) - Add a interrupt handler
where: label is the label the interrupt
will jump to
returns -1 on failure
int interstart( label, timeout ) - Sets timeout ( in ms ) for interrupt
created with interadd()
int interstop( label ) - Stops the interrupt created with interadd()
returns -1 on failure
int interdel( label ) - Deletes a interrupt created with interadd()
interret() - You must use this return in your interrupt
handler.
Computer Vision - Language Extension
cv_filter1.see,cv_test1.see,cv_test2.see,cv_test3.see,emgrobodemos.see
int computervision() - returns revision number
int visionopen - Open vision with specified DLL
visionprint( index ) - Sends vision strings to console
int visionframe( ) - returns frame #
visionwait( frames ) - block for X frames
visionfilter( filter.dll ) - sets a vision filter
int visionread( index ) - Read vision variables
int visionwrite( index, data ) - write vision variables
visionclose - close computer vision instance
Speech Recognition / Text to Speech ( SAPI ) - Language Extension – sapitest1.see
int sapi() - return revision number
int sapiopen() - Opens a SAPI interface
int sapiclose() - Closes a SAPI interface
int sapilisten() - sapilisten( 0=off, 1=on )
int spipoll( "word1", "word2", "word3", "word4", "word5" ) - Listen for these words
int sapispeak( "string to speak" ) - Text to speech
int sapiprint( "string", var, "string", var, "string", var ) - print to SAPI
Joystick - Language Extension – sapitest1.see
int joystick() - returns joystick dll revision
int joystickread( num, x, y, butt ) - returns 0 if joystick detected.
int joystickread( num, x, y, butt, z, r ) num = joystick number 0 = 1 joy
int joystickread( num, x, y, butt, z, r, pov ) x,y,butt,z,r,pov,u,v variables
int joystickread( num, x, y, butt, z, r, pov, u, v ) are assigned values based on
state of joystick.
Tested using Logitech Dual Action
See testjoystick.see for examples
KevinJr - Language Extension
int kevinjr(0) - returns kevinjr language extension revision number
int kevinjr(1) - returns USB DLL revision number
var( variable_name ) - Creates a variable
var( variable_name, assignement ) - Creates a variable, and assigns it a value
servos( duty1, duty2, duty3, duty4, duty5, duty6, duty7, duty8 ) - move all servos at once
servo( servo_num, duty ) - Moves a single servo
leds( led1, led2, led3, led4, led5, led6, led7 ) - led = 0,1,2,3 - 0=off, 1=green, 2=red, 3=yellow
led( led_num, value ) - single led control
usbopen( "path/filename to USB dll" ) - opens the HID USB DLL
int readtouch( var1, var2, var3 ) - Reads the Touch sensors
int readaccel( var1, var2, var3 ) - Reads the accelerometer
int readsensors( var1, var2, var3, var4, var5, var6 ) - Reads both touch and accel
int iicwrite( address, data ) - Write to iic
int iicread( address ) - read from iic
DataGrapherUI - Graphs your RobotSee Variables in RealTime
RobotVisionToolkit with RobotSee Overview pdf
Download Latest Alpha Version of the RobotVisionToolkit with RobotSee
RobotSee in Action - Videos of Robots programmed using RobotSee
The firmware on this website is not supported by FreeScale Semiconductor.
Anything on this website is provided "as is" without warranty of any kind, either express or implied.
You assume the entire risk arising out of the use or performance of anything you download from this site, or any site linked from this site. For question please contact eric.gregori@freescale.com