@@ -496,59 +496,6 @@ def dht(self, pin, module = 0):
496496 except :
497497 return None
498498
499- # Bryan's attempt at extending this package's functionality to include the ability to write text to the Arduino screen.
500- # I will ignore drawing anything fancy, and just focus on displaying text. If fancy drawings are seen to be useful, they can be added later.
501-
502- # There will be several functions. One to clear and reset the display,
503- # one to set up the display to draw things, and one to actually draw the text (the most resource-intensive, so should be called at the end)
504-
505-
506- # Let's do this.
507-
508- def setupDisplay (self ):
509- """
510- Sets up a I2C-connected SSD1306 display to receive data. This sends
511- the command 'scs' to the Arduino (SCreen Setup).
512-
513-
514- Inputs: (TODO)
515- width: width of the display, in pixels.
516- height: height of the display, in pixels.
517-
518- """
519-
520- width = 128
521- height = 32
522-
523- cmd_str = build_cmd_str ("scs" , (width , height ))
524- try :
525- self .sr .write (str .encode (cmd_str ))
526- self .sr .flush ()
527- except :
528- pass
529- # not sure what this does
530- # rd = self.sr.readline().decode("utf-8").replace("\r\n", "")
531- # try:
532- # return int(rd)
533- # except:
534- # return 0
535-
536-
537- def clearDisplay (self ):
538- """
539- Clears the connected display from its previously-set values. Should
540- be called before writing anything new to the display.
541-
542- This sends the command 'scc' to the Arduino (SCreen Clear).
543- """
544-
545- cmd_str = build_cmd_str ("scc" )
546- try :
547- self .sr .write (str .encode (cmd_str ))
548- self .sr .flush ()
549- except :
550- pass
551-
552499
553500 def displayText (self , text , fontsize = 1 ):
554501 """
0 commit comments