Skip to content

Extension Walkthrough

Now that you have MARLIN installed, we will go through the MARLIN control station. By the end of this page, you will be able to connect to the controller and robot.

The MARLIN control station is divided into 6 cards.

  1. Your Program
  2. Controller
  3. Robot Brain
  4. Match Control
  5. Pool Network
  6. Console

The MARLIN control station open beside a new project in VS Code.

The Your Program section creates a new MARLIN project or opens an existing one.

ButtonWhat it does
New ProjectCreate a new MARLIN project from a blank or example template
Open ProjectOpen an existing MARLIN project on your laptop

A MARLIN project is a folder that contains src/main.py and a project.marlin marker file.

The Your Program card, with New Project and Open Project.

Click New Project to create a new MARLIN project. You can choose between a blank or example project. The example project will contain the basic code needed to use your starter boat. If you want to use an existing project, click Open Project and select your MARLIN project folder.

The Controller section manages the Controller and Beacon connections. When you connect the Controller to your laptop, MARLIN will autodetect the port it is connected to. On macOS, the port name will be displayed as /dev/tty.usbmodemXXXX. On Windows, it will be displayed as COMX port, where X represents a number. In the event that the controller does not connect, follow the steps below:

  1. Disconnect the Controller from your laptop.
  2. Click Refresh.
  3. Note down the list of ports.
  4. Connect the Controller to your laptop.
  5. Click Refresh.
  6. There should be a new port in the list. That is your Controller.
  7. Select the Controller port.
  8. Click Connect.

The Controller card before connecting: a port dropdown, Refresh and Connect buttons, and "Firmware: unknown".

After connecting the Controller, you will be able to pair the Robot Brain.

The Controller card before connecting: a port dropdown, Refresh and Connect buttons, and "Firmware: unknown".

Once you have connected the Controller, calibrate the Controller sticks. Click Calibrate Sticks, and follow the instructions given. The calibration data will be stored in the project.marlin file.

If stick calibration fails, that means the Controller did not successfully connect to your laptop. Follow the steps above to connect the Controller.

Every Beacon has a specific channel number. Select the Beacon channel you are using. This will be the channel the Beacon Receiver listens to. If you select the wrong channel, the Beacon Receiver will not output the correct data.

The Robot Brain card after pairing, showing "Robot brain connected." with battery and board-temperature dials.

After connecting the Controller, the Robot Brain section will be accessible. Without a Controller, you will not be able to connect to the Robot Brain. The Robot Brain section manages the pairing of Controller to the Robot Brain via Bluetooth and displays its live telemetry. To pair with the Robot Brain, you should:

  1. Press and hold the pairing button on the Robot Brain until the LED rapidly flashes.
  2. Enter the name engraved on the side of the Robot Brain. The Robot Brain’s Bluetooth name takes the form M_<Name>.
  3. Click Connect.
  4. The Battery and Board dials should be showing values.

The Match Control section controls the state of the Robot.

ControlRobot behaviour
PauseIdle or pause Robot
AutonRuns autonomous(robot)
DriverRuns driver(robot)
E-STOPEmergency stop Robot
Clear E-StopClear E-Stop when it is safe

The “Match phase” line under the buttons shows what the robot is doing right now (for example “Match phase: Paused”), and highlights the matching button.

The Match Control card, with Pause, Auton, Driver, E-STOP, and Clear E-Stop buttons.

The Pool Network section connects your laptop to the Pool Server. Leave the server URL blank unless connecting to a Pool Server.

FieldWhat to enter
Pool serverPool Server Address, such as 192.168.1.1:3000
Team numberYour team or robot number
StationYour assigned driver station (Red 1, Red 2, Blue 1, or Blue 2)

The Pool Network card, with fields for the MARLIN server URL, team number, and driver station.

This section is only used with a MARLIN Pool Server. For usage without a Pool Server, leave this section blank.

After filling in the fields, click Save. They are stored in VS Code settings. Connect to connect to the Pool Server. If the URL is wrong or the Pool Server is unavailable, the console may show repeated connection errors.

Once you have connected to the Pool Server, the local Pause, Auton, and Driver buttons are disabled. The Pool Server controls the match phases.

Disconnect when you are not using the Pool Server.

Console messages appear in their own MARLIN Console panel, not in the control station itself. Open it with the Open Console button at the bottom of the control station.

The MARLIN control station scrolled to the bottom. Below the Match Control card with its E-STOP button is the Open Console button. A new project's src/main.py is open in the editor alongside it.

Scroll to the bottom of the control station to find Open Console. This screenshot also shows what a freshly created project looks like: src/main.py with empty autonomous() and driver() functions, ready for your code.

The console has a source filter (All messages, [EXT] Extension, [CON] Controller, [POOL] Field, [OUT] Student script, [IN] Console input), a Clear button, and an input box so you can type a value into your program’s input() call while it is running. [OUT] is your own program’s output.

Read the newest message first when something goes wrong. Categories you will see include:

  • [EXT] extension-level problems, such as Python failing to import marlin.
  • [CON] Controller/serial activity, including controller button and trigger presses when connected.
  • [POOL] pool server connection and match messages.
  • [OUT] your running program’s own output.

Next: Try out the example code in Your First Program.