Example #1
0
        public static void init(String headCom, String irCom)
        {
            //create new servo handle and init nessary values
            servoHandle = new Servo(headCom);
            servoHandle.setSpeed(neck, 40);
            servoHandle.setSpeed(shoulder, 20);
            servoHandle.enableTorque(neck);
            servoHandle.enableTorque(shoulder);

            //create ironto handle with full mode
            irobotHandle = IRobot.init(irCom, 115200, 1);
        }
Example #2
0
        public void init()
        {
            double speed, inputSpeed;

            servos = new Servo("COM17");
            servos.enableTorque(neck, Servo.Torque_1);
            servos.enableTorque(head, Servo.Torque_1);
            servos.setSpeed(neck, 10); //set speed to 10ms
            servos.setSpeed(head, 10); //set speed to 10ms
            greate = new Greating();   //create greating object
            //iRobot = new IRobotCreate();
            IRobotCreate.init(115200, "COM7");
            IRobotCreate.sensorDataHandler += new IRobotCreate.SensorDataHandler(onSensorData);
        }