Skip to content

Monitors

Overview

The Monitors section of the cee API provides functions for interacting with and controlling monitor devices and terminal screens in CC: Computer Energetics.


Calling Conventions / Prefixes

Monitor handles are obtained via methods like cee.getMonitor(pin, n) or cee.getMonitors(pin), and methods are called directly on the returned terminal handle:

local monitor = cee.getMonitor(1, 1)
monitor.clear()

API Reference Table

Method Signature Arguments & Types Description
monitor.setTextScale(scale) scale (number, 0.5 to 5) Resizes the character grid and clears it, as on a stock monitor.
monitor.getTextScale() None Returns the scale it is on now.
monitor.getCount() None Returns the number of screens on this pin.
monitor.write(text) text (string) Writes text at the current cursor position (standard terminal API).
monitor.clear() None Clears the monitor screen.
monitor.setCursorPos(x, y) x (number), y (number) Sets cursor position.

Lua Code Examples

Example 1: Resizing Text Scale and Writing

local monitor = cee.getMonitor(1, 1)
if monitor then
    monitor.setTextScale(2.0)
    monitor.clear()
    monitor.setCursorPos(1, 1)
    monitor.write("Scaled Display")
end