Class grid

Grid class

Functions

grid.add (dev) static callback when any grid device is added; user scripts can redefine
grid.remove (dev) static callback when any grid device is removed; user scripts can redefine
grid.connect (n) create device, returns object with handler and send.
grid.cleanup () clear handlers.
grid.update_devices () update devices.
_norns.grid.key (id, x, y, s) redefine global grid key input handler

Methods

grid:new (id, serial, name, dev) constructor
grid:led (x, y, val) set state of single LED on this grid device.
grid:all (val) set state of all LEDs on this grid device.
grid:refresh () update any dirty quads on this grid device.
grid:intensity (i) intensity


Functions

grid.add (dev)
static callback when any grid device is added; user scripts can redefine

Parameters:

  • dev : a Grid table
grid.remove (dev)
static callback when any grid device is removed; user scripts can redefine

Parameters:

  • dev : a Grid table
grid.connect (n)
create device, returns object with handler and send.

Parameters:

  • n integer : vport index
grid.cleanup ()
clear handlers.
grid.update_devices ()
update devices.
_norns.grid.key (id, x, y, s)
redefine global grid key input handler

Parameters:

  • id
  • x
  • y
  • s

Methods

grid:new (id, serial, name, dev)
constructor

Parameters:

  • id integer : arbitrary numeric identifier
  • serial string : serial
  • name string : name
  • dev userdata : opaque pointer to device
grid:led (x, y, val)
set state of single LED on this grid device.

Parameters:

  • x integer : column index (1-based!)
  • y integer : row index (1-based!)
  • val integer : LED brightness in [0, 15]
grid:all (val)
set state of all LEDs on this grid device.

Parameters:

  • val integer : LED brightness in [0, 15]
grid:refresh ()
update any dirty quads on this grid device.
grid:intensity (i)
intensity

Parameters:

  • i
generated by LDoc 1.4.6 Last updated 2020-03-28 23:45:19