Module grid

grid

Class grid

grid:add (dev) callback called when a grid is plugged in; overwrite in user scripts
grid:connect (n) attempt to connect grid at port n
grid:remove (dev) callback executed when a grid is removed; overwrite in user scripts
grid:rotation (self, val) set grid rotation
grid:led (self, x, y, val) set grid led
grid:all (self, val) set all grid leds
grid:refresh (self) refresh dirty quads
grid:intensity (self, i) limit led intensity
grid:tilt (self, sensor, tilt) enable/disable grid tilt sensor


Class grid

grid object
grid:add (dev)
callback called when a grid is plugged in; overwrite in user scripts

Parameters:

  • dev grid grid object
grid:connect (n)
attempt to connect grid at port n

Parameters:

  • n integer (1-4)

Returns:

    grid grid
grid:remove (dev)
callback executed when a grid is removed; overwrite in user scripts

Parameters:

  • dev grid grid object
grid:rotation (self, val)
set grid rotation

Parameters:

  • self grid grid object
  • val integer rotation
grid:led (self, x, y, val)
set grid led

Parameters:

  • self grid grid object
  • x integer x-coordinate of led (1-based)
  • y integer y-coordinate of led (1-based)
  • val integer (0-15)
grid:all (self, val)
set all grid leds

Parameters:

  • self grid grid object
  • val integer (0-15)
grid:refresh (self)
refresh dirty quads

Parameters:

  • self grid grid object
grid:intensity (self, i)
limit led intensity

Parameters:

  • self grid grid object
  • i integer intensity limit
grid:tilt (self, sensor, tilt)
enable/disable grid tilt sensor

Parameters:

  • self grid grid object
  • sensor integer (1-based)
  • tilt bool enable/disable flag
generated by LDoc 1.5.0 Last updated 2024-01-13 13:12:10