Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Fix example to display "hello world"
  • Loading branch information
santaimpersonator committed May 13, 2021
1 parent 61186fb commit b9d6c6a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions README.md
Expand Up @@ -108,20 +108,22 @@ def runExample():
# all of the pins and configure the OLED.


print("\nSparkFun Micro OLED Hello Example\n")
print("\nSparkFun Micro OLED - Hello Example\n")
myOLED = qwiic_micro_oled.QwiicMicroOled()

if myOLED.isConnected() == False:
print("The Qwiic Micro OLED device isn't connected to the system. Please check your connection", \
file=sys.stderr)
return

# Before you can start using the OLED, call begin() to init all of the pins and configure the OLED.
myOLED.begin()
# clear(ALL) will clear out the OLED's graphic memory.
# clear(PAGE) will clear the Arduino's display buffer.
myOLED.clear(myOLED.ALL) # Clear the display's memory (gets rid of artifacts)
# To actually draw anything on the display, you must call the
# display() function.

myOLED.clear(myOLED.PAGE) # Clear the display's buffer

myOLED.print("Hello World") # Add "Hello World" to buffer

# To actually draw anything on the display, you must call the display() function.
myOLED.display()

runExample()
Expand Down

0 comments on commit b9d6c6a

Please sign in to comment.