OUR NETWORK:TiVo Community TechLore Sling Community My DigitalEntertainer MyOpenRouter MediaSmart home See all... About UsAdvertiseContact Us

 
Learn about scoring Forum's Raw Score: 41962.7
February 7, 2008 07:45 PM

Categories: RoboCommunity Lounge General WowWee Discussion RS Media

Rating (0 votes)
  • 1
  • 2
  • 3
  • 4
  • 5
Rate This!

Member Avatar

soumyatilak

Member
Joined: 12/06/2007

hi

i need some help with a simple midlet program for rs media. i want to know if my coding is right.

i just need the rsmedia todo a few arm movements. thats all.

can someone please help me out immediately? i need to get it ready by tonight.

i had done it earlier, but the files had got deleted off my computer, and now the code i rewrote is not working.

:(

 thanks

Discussion:    Add a Comment | Comments 1-2 of 2 | Latest Comment

February 8, 2008 5:08 PM

Could you post the code?

For Great Old Time Radio, Check Out
www.brandoclassicotr.com
www.brandoclassicots.com

February 8, 2008 5:27 PM

import com.sun.robot.humanoid.Humanoid;

import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

public class Main extends MIDlet {
   
    private final Humanoid humanoid;
   
    public Main() {
        humanoid = Humanoid.getInstance();
    }
   
    protected void startApp() throws MIDletStateChangeException{
       
        // Begin by adjusting to a good default position.
        humanoid.restoreDefaultPosition();
       
        // Exercise Routine
        exercise();
       
    }
   
    protected void pauseApp() {
        //stop the Robot
        humanoid.stop();
    }
   
   protected void destroyApp(boolean b) throws MIDletStateChangeException {
        //shutdown the Robot
        humanoid.shutdown();
    }
   
    private void exercise(){
       
        humanoid.SHOULDER_LEFT_SERVO.moveToPosition(0, 8);
        humanoid.SHOULDER_RIGHT_SERVO.moveToPosition(0, 8);
        humanoid.waitUntilStop();
        humanoid.SHOULDER_LEFT_SERVO.moveToPosition(22, 8);
        humanoid.SHOULDER_RIGHT_SERVO.moveToPosition(22, 8);
        humanoid.waitUntilStop();
        humanoid.WAIST_UP_DN_SERVO.moveToPosition(14, 8);
        humanoid.waitUntilStop();
        humanoid.WAIST_UP_DN_SERVO.moveToPosition(28, 8);
        humanoid.waitUntilStop();
        humanoid.LEFT_ARM.wave();
        humanoid.RIGHT_ARM.wave();
    }

}

Discussion:    Add a Comment | Comments 1-2 of 2 | Latest Comment

Add Your Reply

(will not be displayed)

Email me when comments are added to this thread

 
 

Please log in or register to participate in this community!

Log In

Remember

Not a member? Sign up!

Did you forget your password?

close this window
close this window