/* File name: groupninearray.ch * A group with nine Mobot-I's in synchronized motion using an array. * * 1 2 3 * |--| |--| |--| * |__| |__| |__| * * 4 5 6 * |--| |--| |--| * |__| |__| |__| * * 7 8 9 * |--| |--| |--| * |__| |__| |__| * * Make sure that robots are attached with wheels. */ #include CMobotI mobot[9]; /* declare an array of 9 Mobot-I's */ CMobotIGroup group; /* declare a Mobot-I group */ group.addRobots(mobot); /* add 9 Mobot-I's to the group */ group.connect(); group.resetToZero(); group.moveForward(360); group.moveBackward(360); group.turnLeft(90); group.moveForward(360); group.moveBackward(360); group.turnLeft(45); group.moveForward(360); group.moveBackward(360); group.turnRight(135);