From Aibo Stuff

The R-CODE SDK offers an environment to execute a simplified interpreted scripting language that can be used to program AIBO. You can use sensor data, variables, R-CODE's built-in commands, and more to program AIBO.
You can program AIBO to walk or dance with only a few lines of code.

R-CODE is suitable for hobby users, because it is very easy to create robot programs. With R-CODE, you can use 600 (or more) built-in motions that are included in commercial AIBOware. R-CODE is an interpreted language, so it is not recommended for complex calculations, but it is easy to modify the script program and re-run.

The R-CODE script program can be executed by copying it to an AIBO Programming Memory Stick with the R-CODE system (runtime) files. You can upload an R-CODE script to AIBO and debug it by using a wireless LAN.

:BallDirPRINT:"SEE IF THE BALL IS WAY OFF ON AIBO'S SIDE"WAIT:1// CHECK ONE SIDEIF:Head_Pan:>:35:THENIF:Wait:=:1:THENPRINT:"IT IS SO TURN IN THAT DIRECTION"PLAY:ACTION:TURN:Head_PanGO:HoldASecENDIFENDIF// NOW THE OTHER SIDE IF:Head_Pan:<:-35:THENIF:Wait:=:1:THENPRINT:"IT IS SO TURN IN THAT DIRECTION"PLAY:ACTION:TURN:Head_PanGO:HoldASecENDIFENDIF

// BALL MUST BE SOMEWHAT IN FRONT OF AIBOIF:Head_Tilt:>:-60:THENIF:Wait:=:1:THENPRINT:"WALK FOREWORD A BIT, ADJUST DIR SLIGHTLY"PLAY:ACTION:WALK:Head_Pan:30GO:HoldASecENDIFENDIFGO:KickIt

:KickItPRINT:"SAVE SNAPSHOT OF HEAD PAN VALUE BEFORE WE MOVE"SET:pan:Head_PanWAIT:500IF:Head_Pan:=:pan:THENPRINT:"STOP TRACKING"STOPPRINT:"KICK AT THE BALL"PLAY:ACTION:KICK:pan:1000WAITWAITPRINT:"START FROM THE BEGINNING"GO:MainELSEGO:CheckBallENDIF