InfernalRobotics#
Provides functionality to interact with the Infernal Robotics Next mod. Tested with Infernal Robotics Next 3.1.22. Provides the following classes:
Example#
The following example gets the control group named “MyGroup”, prints out the names and positions of all of the servos in the group, then moves all of the servos to the right for 1 second.
import { connect } from "@krpc-org/krpc";
const conn = await connect({ name: "InfernalRobotics Example" });
const vessel = await conn.spaceCenter.getActiveVessel();
const group = await conn.infernalRobotics.servoGroupWithName(
vessel,
"MyGroup",
);
if (group === null) {
throw new Error("Group not found");
}
for (const servo of await group.getServos()) {
console.log(await servo.getName(), await servo.getPosition());
}
await group.moveRight();
await new Promise((resolve) => setTimeout(resolve, 1000));
await group.stop();