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:
- 
                                              spiNumberspi bus to use 
- 
                                              CDNumberCommand/Data select pin 
- 
                                              resetNumberreset pin 
Returns:
refresh
                      
                              ()
                      
                              
                                  Mraa::Result
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Draw the buffer to screen.
Returns:
result of operation
write
                      
                              - 
                                              msg
Write a string to LCD
Parameters:
- 
                                              msgStringthe 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:
- 
                                              rowNumberAxis on the vertical scale. This device supports 6 rows. 
- 
                                              columnNumberAxis on the horizontal scale This device supports 64 columns 
Returns:
result of operation
setTextColor
                      
                              - 
                                              textColor
Sets a text color for a message
Parameters:
- 
                                              textColorNumberFont color: COLOR_WHITE, COLOR_BLACK or COLOR_XOR 
setTextSize
                      
                              - 
                                              size
Sets the size of the font
Parameters:
- 
                                              sizeNumberFont size 
setTextWrap
                      
                              - 
                                              wrap
Wraps a printed message
Parameters:
- 
                                              wrapNumberTrue (1) or false (0) 
drawChar
                      
                              - 
                                              x
- 
                                              y
- 
                                              data
- 
                                              color
- 
                                              size
Write a single character to the screen.
Parameters:
- 
                                              xNumberAxis on the horizontal scale 
- 
                                              yNumberAxis on the vertical scale 
- 
                                              dataNumberCharacter to write 
- 
                                              colorNumberCharacter color 
- 
                                              sizeNumberSize 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:
- 
                                              xNumberthe x position of the pixel 
- 
                                              yNumberthe y position of the pixel 
- 
                                              colorNumberpixel is COLOR_WHITE, COLOR_BLACK or COLOR_XOR 
drawLine
                      
                              - 
                                              x0
- 
                                              y0
- 
                                              x1
- 
                                              y1
- 
                                              color
Draw a line to the screen buffer.
Parameters:
- 
                                              x0Numberthe x position of the beginning of the line 
- 
                                              y0Numberthe y position of the beginning of the line 
- 
                                              x1Numberthe x position of the end of the line 
- 
                                              y1Numberthe y position of the end of the line 
- 
                                              colorNumberline is COLOR_WHITE, COLOR_BLACK or COLOR_XOR 
drawLineHorizontal
                      
                              - 
                                              x
- 
                                              y
- 
                                              width
- 
                                              color
Draw a horizontal line to the screen buffer.
Parameters:
- 
                                              xNumberthe x position of the beginning of the line 
- 
                                              yNumberthe y position of the beginning of the line 
- 
                                              widthNumberis the horizontal length of the line 
- 
                                              colorNumberline is COLOR_WHITE, COLOR_BLACK or COLOR_XOR 
drawLineVertical
                      
                              - 
                                              x
- 
                                              y
- 
                                              height
- 
                                              color
Draw a vertical line to the screen buffer.
Parameters:
- 
                                              xNumberthe x position of the beginning of the line 
- 
                                              yNumberthe y position of the beginning of the line 
- 
                                              heightNumberis the vertical length of the line 
- 
                                              colorNumberline is COLOR_WHITE, COLOR_BLACK or COLOR_XOR 
drawRectangle
                      
                              - 
                                              x
- 
                                              y
- 
                                              width
- 
                                              height
- 
                                              color
Draw a rectangle to the screen buffer.
Parameters:
- 
                                              xNumberthe left edge 
- 
                                              yNumberthe top edge 
- 
                                              widthNumbersets the right edge 
- 
                                              heightNumberbottom edge 
- 
                                              colorNumberoutline 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:
- 
                                              xNumberthe left edge 
- 
                                              yNumberthe top edge 
- 
                                              widthNumbersets the right edge 
- 
                                              heightNumberbottom edge 
- 
                                              radiusNumberof the rounded corners 
- 
                                              colorNumberoutline is COLOR_WHITE, COLOR_BLACK or COLOR_XOR 
drawRectangleFilled
                      
                              - 
                                              x
- 
                                              y
- 
                                              width
- 
                                              height
- 
                                              color
Draw a filled rectangle to the screen buffer.
Parameters:
- 
                                              xNumberthe left edge 
- 
                                              yNumberthe top edge 
- 
                                              widthNumbersets the right edge 
- 
                                              heightNumberbottom edge 
- 
                                              colorNumberfill 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:
- 
                                              x0Numberthe x coordinate of the first corner 
- 
                                              y0Numberthe y coordinate of the first corner 
- 
                                              x1Numberthe x coordinate of the second corner 
- 
                                              y1Numberthe y coordinate of the second corner 
- 
                                              x2Numberthe x coordinate of the third corner 
- 
                                              y2Numberthe y coordinate of the third corner 
- 
                                              colorNumberoutline 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:
- 
                                              x0Numberthe x coordinate of the first corner 
- 
                                              y0Numberthe y coordinate of the first corner 
- 
                                              x1Numberthe x coordinate of the second corner 
- 
                                              y1Numberthe y coordinate of the second corner 
- 
                                              x2Numberthe x coordinate of the third corner 
- 
                                              y2Numberthe y coordinate of the third corner 
- 
                                              colorNumberfill color is COLOR_WHITE, COLOR_BLACK or COLOR_XOR 
drawCircle
                      
                              - 
                                              x0
- 
                                              y0
- 
                                              radius
- 
                                              color
Draw a circle to the screen buffer.
Parameters:
- 
                                              x0Numberthe x coordinate of the circle's center 
- 
                                              y0Numberthe y coordinate of the circle's center 
- 
                                              radiusNumberthe radius of the circle 
- 
                                              colorNumberoutline is COLOR_WHITE, COLOR_BLACK or COLOR_XOR 
drawRoundCorners
                      
                              - 
                                              x0
- 
                                              y0
- 
                                              radius
- 
                                              cornername
- 
                                              color
Draw a quarter circle arc to the screen buffer.
Parameters:
- 
                                              x0Numberthe x coordinate of the arc's center 
- 
                                              y0Numberthe y coordinate of the arc's center 
- 
                                              radiusNumberthe radius of the arc 
- 
                                              cornernameNumberdenotes which of the 4 quarters to draw - 1,2,4,8 
- 
                                              colorNumberoutline is COLOR_WHITE, COLOR_BLACK or COLOR_XOR 
drawCircleFilled
                      
                              - 
                                              x0
- 
                                              y0
- 
                                              radius
- 
                                              color
Draw a filled circle to the screen buffer.
Parameters:
- 
                                              x0Numberthe x coordinate of the circle's center 
- 
                                              y0Numberthe y coordinate of the circle's center 
- 
                                              radiusNumberthe radius of the circle 
- 
                                              colorNumberoutline is COLOR_WHITE, COLOR_BLACK or COLOR_XOR 
drawRoundedCornersFilled
                      
                              - 
                                              x0
- 
                                              y0
- 
                                              radius
- 
                                              cornername
- 
                                              delta
- 
                                              color
Draw a quarter pie to the screen buffer.
Parameters:
- 
                                              x0Numberthe x coordinate of the arc's center 
- 
                                              y0Numberthe y coordinate of the arc's center 
- 
                                              radiusNumberthe radius of the arc 
- 
                                              cornernameNumberdenotes which of the 4 quarters to draw - 1,2,4,8 
- 
                                              deltaNumberundefined 
- 
                                              colorNumberfill color is COLOR_WHITE, COLOR_BLACK or COLOR_XOR 
fillScreen
                      
                              - 
                                              color
Fill the screen buffer with specified color.
Parameters:
- 
                                              colorNumberfill color is COLOR_WHITE, COLOR_BLACK or COLOR_XOR