Write the specified color to an individual pixel at the specified column and row of LED Matrix
Specify the pixel location as 1x2 [column row] value. Specify the color by name.
You can specify the following colors by name:
‘red’ or ‘r’
‘blue’ or ‘b’
‘green’ or ‘g’
‘cyan’ or ‘c’
‘magenta’ or ‘m’
‘yellow’ or ‘y’
‘white’ or ‘w’
‘black’ or ‘k’
To write to an individual LED Matrix pixel at the specified column and row position with the specified color.
writePixel(mysh,[1 1],[255 0 0])
Write the pixel color specified by the value [255, 0, 0] (red) to the pixel at location, [1,1].
Writes the specified color at the specified location on the LED Matrix.
Write the pixel color specified by the name ‘r’ (red) to the pixel at location, [1,1].
mysh— Connection to SenseHAT
Connection to a SenseHAT board, specified as a sensehat object.
pixelLocation— LED Matrix location at which the specified color should be written
The column–row value at which the specified color should be written. Pixel location specified as [1 2] refers to the pixel in the first column and the second row. The column and row values can range from 1 to 8.
The following image shows the pixel locations:
Example: [1 2]
pixelValue— The pixel value that should be written at the specified location
Pixel value that should written at the specified location.
Example: [255, 0, 255]
color— The color that should be written at the specified location
'r' or 'red'|
'g' or 'green'|
'b' or 'blue'|
'y' or 'yellow'|
'c' or 'cyan'|
'm' or 'magenta'|
'w' or 'white'|
'k' or 'black'
The color that should written at the specified location.