← Curriculum
AV InstituteAV Institute LLC
02Week 2 · 5–7 hours

Programming & Control Basics

Control systems, processors, and program logic

Move from signals to behavior. Learn how a commercial AV control system works, the transport types it uses (serial, IP, relay, IR), the programming primitives that drive it, and how to express a room's behavior as logic you can program.

Key Competency

Write room control logic and explain how a control system talks to devices.

AV Institute
AV Institute · Week 2Programming & Control Basics
Lesson

Program a Room Start-up, Display On/Off, Source Selection & Volume Workflow

Est. 75 minCompetency: Express a complete room workflow as program logic and pseudocode.

Learning objectives

  • Write a Start sequence that powers devices in the right order.
  • Implement display on/off with feedback confirmation.
  • Implement source selection that routes video and updates the UI.
  • Implement volume and mute control with feedback.
  • Write a Shutdown sequence that leaves the room safe.

Vocabulary

Sequence
An ordered set of commands executed to reach a room state.
Source selection
Choosing which input feeds the display (and which audio path).
Ramp
A gradually changing value, e.g. volume rising over time.
Interlock
Logic where selecting one source deselects the others.

Lesson content

Now combine everything into the room's core workflows: Start, power, source, volume, and Shutdown. Written as pseudocode, these become the specification you later implement in any ecosystem.

Start sequence

event: button "Start" pressed
  if roomState != STANDBY: return        // ignore if already starting
  roomState = STARTING
  send display power ON
  send switcher route SOURCE_LAPTOP -> OUTPUT_DISPLAY
  send dsp unmute program
  volume = 50; mute = false
  // confirm from feedback, then:
  roomState = ON

Display on/off with feedback

event: button "Display Power" pressed
  if displayPower == OFF:
    send display "PON"; displayPower = PENDING_ON
  else:
    send display "POF"; displayPower = PENDING_OFF

event: feedback display power state
  displayPower = receivedState
  update UI button state = receivedState
  if displayPower == ON and roomState == STARTING:
    roomState = ON

Source selection (interlock)

event: button "Laptop" pressed
  currentSource = LAPTOP
  send switcher route LAPTOP -> DISPLAY
  send dsp route LAPTOP_AUDIO -> PROGRAM
  update UI: highlight Laptop, dim others   // interlock

event: button "Codec" pressed
  currentSource = CODEC
  send switcher route CODEC -> DISPLAY
  send dsp route CODEC_AUDIO -> PROGRAM
  update UI: highlight Codec, dim others

Volume and mute

event: volume slider moved to v
  volume = v; mute = false
  send dsp set program level = v
  update UI slider = v

event: button "Mute" pressed
  mute = !mute
  send dsp mute program = mute
  update UI mute button state = mute

Shutdown sequence

event: button "Shutdown" pressed
  if roomState != ON: return
  roomState = SHUTTING_DOWN
  send dsp mute program
  send display power OFF
  currentSource = NONE
  // after display confirms off:
  roomState = STANDBY
  update UI to welcome/standby screen
Order matters

Power the display first and let it settle before routing. Mute audio before un-routing to avoid pops. Always end Shutdown with the room in a known standby state so the next Start is clean.

Worked example

Full room flow: press Start → display powers on, laptop is routed, audio unmutes at 50. Press Codec → source switches, audio follows. Adjust volume slider → level changes, UI reflects the real value. Press Shutdown → audio mutes, display powers off, room returns to standby. Every step is confirmed from device feedback.

Implementation checklist

  • ✓Start sequence powers devices in the right order with confirmation.
  • ✓Display on/off updates the UI from real feedback.
  • ✓Source selection interlocks: only one highlighted at a time.
  • ✓Volume and mute update from DSP feedback.
  • ✓Shutdown leaves the room in a safe standby state.

Downloadable study guide

study-guide.txtcopy-paste ready
01. Start: set state, power display, route source, unmute at 50, confirm, set ON.
02. Display on/off: send command, set pending, confirm from feedback, update UI.
03. Source selection = interlock; only one source highlighted.
04. Volume/mute: update variable, send level, reflect real feedback.
05. Shutdown: mute, power off, clear source, return to STANDBY.