Dynamic Upgrade
Dynamic Upgrade

Reputation: 21

Manually Calibrate Sphero

I am wondering if there is a way to manually calibrate the sphero? This is a great device, but the sense of where you are gets lost once you start moving around. I want to do some sort of trick where your gps can give the sphero a clue as to where you are and then have that recalibrate or some other way that will let you for instance walk around the rooms of your house and easily let sphero know where you are. Also is there a way to keep the tail light on so the user can always know which way is forward?

--- Edit --- Here are some of the things I have tried from looking at the javadocs:

import orbotix.robot.base.Robot;
import orbotix.robot.base.RobotProvider;

RobotProvider provider = RobotProvider.getDefaultProvider();
Robot sphero = provider.getRobots().iterator().next();
sphero.startCalibration();
sphero.rotateToHeading(angle);
sphero.stopCalibration();

From the docs it looks like this should work but none of the sphero commands seem to be available.

--- Edit 12/30/2013 ---

Ok I just figured out how to turn on the tail light. Here is what I am using:

import orbotix.robot.base.BackLEDOutputCommand;
BackLEDOutputCommand.sendCommand(mRobot, 1.0f);

The float value being the intensity of the tail light. Hope that helps someone.

Upvotes: 1

Views: 1403

Answers (1)

Jon C
Jon C

Reputation: 605

You should be able to turn the tail light on and it will stay on.

To "calibrate" sphero we normally use the "set heading" command, although I don't think that is what you want in this case.

It sounds like you want to mimic our "auto-heading adjust" feature in some of our apps. We do this by hooking into the gyro on the phone and and keep an offset of the yaw from when the user calibrated using our standard calibration control. When sending roll commands from the joystick we look at this yaw offset and adjust the heading appropriately before sending the roll command.

Upvotes: 1

Related Questions