Cockpit slider to control light brightness

I wanted to provide a full SOP for light controls that worked for me after much troubleshooting. It takes into consideration all of the above notes, and has been tried and tested as of September 2026.

  1. Open BlueOS and navigate to Vehicle Setup from the left sidebar
  2. Click on PWM Outputs from the top ribbon, then set “Output 13” to “Disabled” from the dropdown
  3. Open Cockpit and select Edit Interface from the side panel
  4. With “Widget Type” set to “Regular”, add a collapsible container to the screen (forego this step if you want your interactable in a ribbon/other location)
  5. Set “Widget Type” to “Input” and add a slider (or other) to the collapsible container
  6. Under the “Unnamed Custom Widget” dropdown, click the gear icon next to your new slider, enter a label name (optional), click “create” next to “Data-lake variable” under the Actions dropdown, name your variable, e.g., lights-dl, then click “save”
  7. Exit out of Edit Interface and navigate to Tools → Data-lake, then select “Add Compound Variable”
  8. Provide an appropriate name, e.g., lights-var, clear example code from the “Expression” box and add 1100 + round({{user/inputs/lights-dl}}) * 8 , then click “save”
  9. Exit out of Data-lake and navigate to Settings → Actions
  10. Select “+ New Action” → “MAVLink Message Action”, then name the action, lights-act
  11. Change “Command ID” to MAV_CMD_DO_SET_SERVO , set “Parameter 1” to 13 (or whichever PWM Output you disabled) and “Parameter 2” to {{user/compound/lights-var}} (note the difference between expression and variables names, e.g., “inputs/lights-dl” vs. “compound/lights-var”), then click “Create” at the bottom
  12. Select the link icon on your newly-created action, type your Data-lake variable, user/inputs/lights-dl, under “When variable(s) change:”, then change “No faster than” to 5 and click “save”
  13. Return to the main view and test your slider