Set up 7: make the robot configuration
Do it once per robot, and again when you add a part.
If you use only the simulator on this laptop, skip this page: the simulator needs no hubs. Go to Every practice.
The robot configuration tells the Control Hub which device is in which port, and its name. Your
code finds each device by that name.
Why it matters: the names in the code must be exactly the same. Capitals and _ count.
Pick the names first
Section titled “Pick the names first”| Your robot | The names |
|---|---|
| A starter bot (goBILDA, REV, AndyMark, Studica) | The seller’s names: the table for your starter bot. Add a name for each part you added. |
| Your own robot | Your own. Short, small letters, _ between words: front_left, lift, claw. |
-
Connect the Driver Hub to the Control Hub.
-
Open the ⋮ menu > Configure Robot > New.
-
Pick the Control Hub (and the Expansion Hub, if the robot has one).
-
For each port with a device on it:
- Pick its kind: a motor type, Servo, Continuous Rotation Servo, or a sensor.
- Type its name.
If a motor type is not in the list, pick the closest one. The library takes the motor’s real numbers from your code.
-
Leave the imu line as it is. It is the Control Hub’s own IMU (the sensor that knows which way the robot faces).
-
Tap Save. Give the configuration a name, for example
MyRobot. -
Tap Activate.
Done when
Section titled “Done when”The Driver Hub shows your configuration’s name at the top, and each port with a device has a name.
Next: Every practice: pull, change, commit, push. You use it from now on.
A wrong name stops the program at INIT, and the Driver Hub then lists the names that do exist. More: hardware names.
Look it up: Robot.java and Parts catalog: motors, servos, wheels and rollers.
Something wrong on this page? Tell us with a short GitHub form.