upm  0.4.1
Sensor/Actuator repository for libmraa (v0.8.0)
Public Member Functions | List of all members

API for the Olimex LoL array. More...

Detailed Description

This module defines the LoL API and implementation for a simple framebuffer.

lolshield.jpg
upm_lol.LoL sensor = new upm_lol.LoL();
int x = 0, y = 0;
while (true) {
// revert pixel
sensor.setPixel(x, y, sensor.getPixel(x, y));
if (++x == 13) {
x = 0;
y++;
}
if (y == 9)
y = 0;
Thread.sleep(10);
}

Public Member Functions

synchronized void delete ()
 
 LoL ()
 
byte[] getFramebuffer ()
 
boolean getPixel (int x, int y)
 
void setPixel (int x, int y, boolean pixel)
 

Constructor & Destructor Documentation

LoL ( )

Instantiates an LoL object singleton

Member Function Documentation

byte [] getFramebuffer ( )

Gets a framebuffer pointer

Returns
0 if successful
boolean getPixel ( int  x,
int  y 
)

Gets a pixel at specified coordinates

Parameters
xCoordinate x
yCoordinate y
Returns
true if the pixel is on, false if off
Exceptions
std::invalid_argumentif pixel is out of bounds
void setPixel ( int  x,
int  y,
boolean  pixel 
)

Sets a pixel at specified coordinates

Parameters
xCoordinate x
yCoordinate y
pixelfalse is off, true is on
Exceptions
std::invalid_argumentif pixel is out of bounds

The documentation for this class was generated from the following file: