EBOLED Class
- ID: eboled
- Name: SparkFun Block for Intel Edison - OLED
- Other Names: ssd1306
- Category: display
- Manufacturer: sparkfun
- Link: https://www.sparkfun.com/products/13035
- Connection: spi
The EBOLED is an ssd1306 with some modifications to work as an Edison Block. It is a 64x48 pixel OLED display that connects directly to an edison via it's 80-pin connector. Edison Blocks are stackable modules created by Sparkfun.
This block has some buttons on it that can be accessed using standard GPIO b this driver only concerns itself with the display.
Item Index
Methods
- EBOLED
- refresh
- write
- setCursor
- setTextColor
- setTextSize
- setTextWrap
- drawChar
- clear
- clearScreenBuffer
- home
- drawPixel
- drawLine
- drawLineHorizontal
- drawLineVertical
- drawRectangle
- drawRoundedRectangle
- drawRectangleFilled
- drawTriangle
- drawTriangleFilled
- drawCircle
- drawRoundCorners
- drawCircleFilled
- drawRoundedCornersFilled
- fillScreen
Methods
EBOLED
-
spi
-
CD
-
reset
EBOLED Constructor. Note that you will not have any choice as to the pins used, so they are all set to default values.
Parameters:
-
spi
Numberspi bus to use
-
CD
NumberCommand/Data select pin
-
reset
Numberreset pin
Returns:
refresh
()
Mraa::Result
Draw the buffer to screen.
Returns:
result of operation
write
-
msg
Write a string to LCD
Parameters:
-
msg
Stringthe std::string to write to display, note only ascii chars are supported
Returns:
result of operation
setCursor
-
row
-
column
Set cursor to a coordinate
Parameters:
-
row
NumberAxis on the vertical scale. This device supports 6 rows.
-
column
NumberAxis on the horizontal scale This device supports 64 columns
Returns:
result of operation
setTextColor
-
textColor
Sets a text color for a message
Parameters:
-
textColor
NumberFont color: COLOR_WHITE, COLOR_BLACK or COLOR_XOR
setTextSize
-
size
Sets the size of the font
Parameters:
-
size
NumberFont size
setTextWrap
-
wrap
Wraps a printed message
Parameters:
-
wrap
NumberTrue (1) or false (0)
drawChar
-
x
-
y
-
data
-
color
-
size
Write a single character to the screen.
Parameters:
-
x
NumberAxis on the horizontal scale
-
y
NumberAxis on the vertical scale
-
data
NumberCharacter to write
-
color
NumberCharacter color
-
size
NumberSize of the font
clear
()
Mraa::Result
Clear display
Returns:
result of operation
clearScreenBuffer
()
home
()
Mraa::Result
Return to coordinate 0,0
Returns:
result of operation
drawPixel
-
x
-
y
-
color
Write a single pixel to the screen buffer. Can do an specific color write or toggle (xor) a pixel.
Parameters:
-
x
Numberthe x position of the pixel
-
y
Numberthe y position of the pixel
-
color
Numberpixel is COLOR_WHITE, COLOR_BLACK or COLOR_XOR
drawLine
-
x0
-
y0
-
x1
-
y1
-
color
Draw a line to the screen buffer.
Parameters:
-
x0
Numberthe x position of the beginning of the line
-
y0
Numberthe y position of the beginning of the line
-
x1
Numberthe x position of the end of the line
-
y1
Numberthe y position of the end of the line
-
color
Numberline is COLOR_WHITE, COLOR_BLACK or COLOR_XOR
drawLineHorizontal
-
x
-
y
-
width
-
color
Draw a horizontal line to the screen buffer.
Parameters:
-
x
Numberthe x position of the beginning of the line
-
y
Numberthe y position of the beginning of the line
-
width
Numberis the horizontal length of the line
-
color
Numberline is COLOR_WHITE, COLOR_BLACK or COLOR_XOR
drawLineVertical
-
x
-
y
-
height
-
color
Draw a vertical line to the screen buffer.
Parameters:
-
x
Numberthe x position of the beginning of the line
-
y
Numberthe y position of the beginning of the line
-
height
Numberis the vertical length of the line
-
color
Numberline is COLOR_WHITE, COLOR_BLACK or COLOR_XOR
drawRectangle
-
x
-
y
-
width
-
height
-
color
Draw a rectangle to the screen buffer.
Parameters:
-
x
Numberthe left edge
-
y
Numberthe top edge
-
width
Numbersets the right edge
-
height
Numberbottom edge
-
color
Numberoutline is COLOR_WHITE, COLOR_BLACK or COLOR_XOR
drawRoundedRectangle
-
x
-
y
-
width
-
height
-
radius
-
color
Draw a rectangle with rounded corners to the screen buffer.
Parameters:
-
x
Numberthe left edge
-
y
Numberthe top edge
-
width
Numbersets the right edge
-
height
Numberbottom edge
-
radius
Numberof the rounded corners
-
color
Numberoutline is COLOR_WHITE, COLOR_BLACK or COLOR_XOR
drawRectangleFilled
-
x
-
y
-
width
-
height
-
color
Draw a filled rectangle to the screen buffer.
Parameters:
-
x
Numberthe left edge
-
y
Numberthe top edge
-
width
Numbersets the right edge
-
height
Numberbottom edge
-
color
Numberfill color is COLOR_WHITE, COLOR_BLACK or COLOR_XOR
drawTriangle
-
x0
-
y0
-
x1
-
y1
-
x2
-
y2
-
color
Draw a triangle to the screen buffer.
Parameters:
-
x0
Numberthe x coordinate of the first corner
-
y0
Numberthe y coordinate of the first corner
-
x1
Numberthe x coordinate of the second corner
-
y1
Numberthe y coordinate of the second corner
-
x2
Numberthe x coordinate of the third corner
-
y2
Numberthe y coordinate of the third corner
-
color
Numberoutline is COLOR_WHITE, COLOR_BLACK or COLOR_XOR
drawTriangleFilled
-
x0
-
y0
-
x1
-
y1
-
x2
-
y2
-
color
Draw a filled triangle to the screen buffer.
Parameters:
-
x0
Numberthe x coordinate of the first corner
-
y0
Numberthe y coordinate of the first corner
-
x1
Numberthe x coordinate of the second corner
-
y1
Numberthe y coordinate of the second corner
-
x2
Numberthe x coordinate of the third corner
-
y2
Numberthe y coordinate of the third corner
-
color
Numberfill color is COLOR_WHITE, COLOR_BLACK or COLOR_XOR
drawCircle
-
x0
-
y0
-
radius
-
color
Draw a circle to the screen buffer.
Parameters:
-
x0
Numberthe x coordinate of the circle's center
-
y0
Numberthe y coordinate of the circle's center
-
radius
Numberthe radius of the circle
-
color
Numberoutline is COLOR_WHITE, COLOR_BLACK or COLOR_XOR
drawRoundCorners
-
x0
-
y0
-
radius
-
cornername
-
color
Draw a quarter circle arc to the screen buffer.
Parameters:
-
x0
Numberthe x coordinate of the arc's center
-
y0
Numberthe y coordinate of the arc's center
-
radius
Numberthe radius of the arc
-
cornername
Numberdenotes which of the 4 quarters to draw - 1,2,4,8
-
color
Numberoutline is COLOR_WHITE, COLOR_BLACK or COLOR_XOR
drawCircleFilled
-
x0
-
y0
-
radius
-
color
Draw a filled circle to the screen buffer.
Parameters:
-
x0
Numberthe x coordinate of the circle's center
-
y0
Numberthe y coordinate of the circle's center
-
radius
Numberthe radius of the circle
-
color
Numberoutline is COLOR_WHITE, COLOR_BLACK or COLOR_XOR
drawRoundedCornersFilled
-
x0
-
y0
-
radius
-
cornername
-
delta
-
color
Draw a quarter pie to the screen buffer.
Parameters:
-
x0
Numberthe x coordinate of the arc's center
-
y0
Numberthe y coordinate of the arc's center
-
radius
Numberthe radius of the arc
-
cornername
Numberdenotes which of the 4 quarters to draw - 1,2,4,8
-
delta
Numberundefined
-
color
Numberfill color is COLOR_WHITE, COLOR_BLACK or COLOR_XOR
fillScreen
-
color
Fill the screen buffer with specified color.
Parameters:
-
color
Numberfill color is COLOR_WHITE, COLOR_BLACK or COLOR_XOR