MD_Cubo LED Cube Arduino Library  1.1
Library to control LED Cubes
MD_Cubo_72xx Class Reference
+ Inheritance diagram for MD_Cubo_72xx:
+ Collaboration diagram for MD_Cubo_72xx:

Public Member Functions

void begin ()
 
void update ()
 
void setVoxel (boolean p, uint8_t x, uint8_t y, uint8_t z)
 
boolean getVoxel (uint8_t x, uint8_t y, uint8_t z)
 
void setIntensity (uint8_t intensity)
 
void clear (boolean p=false)
 
uint8_t size (axis_t axis)
 
- Public Member Functions inherited from MD_Cubo
 MD_Cubo (uint8_t sizeCube)
 
 ~MD_Cubo ()
 
virtual void animate (uint32_t wait=0)
 
virtual void fillPlane (boolean p, plane_t plane, uint8_t coord)
 
virtual void copyPlane (plane_t plane, uint8_t cordFrom, uint8_t cordTo)
 
virtual void drawLine (boolean p, uint8_t x1, uint8_t y1, uint8_t z1, uint8_t x2, uint8_t y2, uint8_t z2)
 
virtual void drawRPrism (boolean p, uint8_t x, uint8_t y, uint8_t z, int8_t dx, uint8_t dy, uint8_t dz)
 
void drawCube (boolean p, uint8_t x, uint8_t y, uint8_t z, int8_t size)
 

Additional Inherited Members

- Public Types inherited from MD_Cubo
enum  axis_t { XAXIS, YAXIS, ZAXIS }
 
enum  plane_t { XYPLANE, XZPLANE, YZPLANE }
 
- Protected Attributes inherited from MD_Cubo
uint8_t _sizeXaxis
 the number of LEDs on x axis of the cube. Total number of pixels is x*y*z.
 
uint8_t _sizeYaxis
 the number of LEDs on y axis of the cube. Total number of pixels is x*y*z.
 
uint8_t _sizeZaxis
 the number of LEDs on z axis of the cube. Total number of pixels is x*y*z.
 

Member Function Documentation

§ begin()

void MD_Cubo_72xx::begin ( void  )
virtual

Initialize the object.

Initialise the object data. This needs to be called during setup() to initialise new data for the class that cannot be done during the object creation.

Hardware interfaces implemented in virtual functions should be initialized here.

Reimplemented from MD_Cubo.

§ clear()

void MD_Cubo_72xx::clear ( boolean  p = false)
virtual

Clear the cube.

Set every pixel in the cube to the specificed value (default off). The generic method iterates through all the pixels. A more efficient implementation may be possible by exploiting access to hardware.

Parameters
pset ON if true, off if false (default).
Returns
No return value.

Reimplemented from MD_Cubo.

§ getVoxel()

boolean MD_Cubo_72xx::getVoxel ( uint8_t  x,
uint8_t  y,
uint8_t  z 
)
virtual

Get the status of specified pixel in the cube.

This is the most basic graphic function and is necessarily only implementable in the user derived object, as it is heavily related to the hardware configuration. The (x,y,z) coordinate for the pixel needs to be mapped to a device address and on/off value of the pixel returned to the calling program..

Parameters
xx coordinate for the pixel.
yy coordinate for the pixel.
zz coordinate for the pixel.
Returns
pixel value - if false if the pixel is off. true if the pixel on.

Reimplemented from MD_Cubo.

§ setIntensity()

void MD_Cubo_72xx::setIntensity ( uint8_t  intensity)
virtual

Set the intensity/brightness of the cube.

Set the overall brightness of the cube. This is only implementable in the user derived object, as it is heavily reliant on the hardware configuration.

Brightness is supplied as a number 0 to MAX_INTENSITY (0 is darkest). If the hardware has a different range this will need to be remapped in the user derived object.

Parameters
intensitythe intensity for the cube (0 .. MAX_INTENSITY).
Returns
No return value.

Reimplemented from MD_Cubo.

§ setVoxel()

void MD_Cubo_72xx::setVoxel ( boolean  p,
uint8_t  x,
uint8_t  y,
uint8_t  z 
)
virtual

Set the specified point in the cube.

This is the most basic graphic function and is necessarily only implementable in the user derived object, as it is heavily related to the hardware configuration. The (x,y,z) coordinate for the pixel needs to be mapped to a device action to turn the pixel on or off.

Parameters
ppixel value - if false, set the pixel off. If true, set the pixel on.
xx coordinate for the pixel.
yy coordinate for the pixel.
zz coordinate for the pixel.
Returns
No return value.

Reimplemented from MD_Cubo.

§ size()

uint8_t MD_Cubo_72xx::size ( axis_t  axis)
virtual

Return the size of the cube.

Return the number of LED on one side of the cube. Allows high level code to be independent of any size definitions, which are known in in the user derived object, as it is reliant on the hardware configuration.

Parameters
axisspecifies the axis required, one of the axis_t enumerations
Returns
size of the cube..

Reimplemented from MD_Cubo.

§ update()

void MD_Cubo_72xx::update ( )
virtual

Update the cube display.

All cube changes are buffered internally until this method is called, at which time the cube is updated. This is only implementable in the user derived object, as it is heavily reliant on the hardware configuration.

Returns
No return value.

Reimplemented from MD_Cubo.


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