Pi Pico Smart Watering System Controller

Pi Pico Smart Watering System Controller
This began back in January as an idea after building a very basic single channel unit. I wanted a stand alone device based on the Pico with some smarts. Commercial smart watering systems use a Wifi connection to the internet, and get weather reports to determine the level of watering required. These systems are setup and controlled via a phone or tablet app.

My design uses a nRF905 444Mz radio link to program the controller and uses sensors to determine the level of watering needed. It records Temperature, Humidity and Rainfall over a seven day period, calculating the optimum watering level. Parameters in the program were taken from the recommendations for smart watering systems; ie 5mm Rainfall reduce watering by 50%, 10mm Rainfall no watering for 3 days at least, over 35 degrees increase watering by 20%.

Using a radio link means no need for internet or Wifi. The nRF905 modules are good for up to 30 meters line of sight.

Parts – major items only
Raspberry Pi Pico
PicoDev OLED
PicoDev Capacitive Touch
MakerVerse RTC
MakerVerse Pico development board
SHT31 Weather-proof Temperature & Humidity Sensor
nRF905 module x 2
4 Channel Solid State Relay Module
1 Channel Solid State Relay Module

Hardware
The system is powered by a 24vac plug pack rated at 1A. Solid State Relays switch 24vac to activate water solenoids. A switch mode power supply converts 24vac to 5VDC and the Pico supplies the 3V3 to the sensors. Link to switch mode power supply.

The SHT31 Temperature / Humidity sensor was chosen because it is water proof and the cable allows it to be placed some distance from the controller.

Rainfall is measured by connection to a Tipping Bucket Rain Guage. The input is connected through an Opto Coupler and drives an interrrupt each time the bucket is tipped. This has been tested with a push button switch.

Solid State Relays were chosen over mechanical ones due to less current to active (10mA compared to 75mA) and quieter operation. The case size determined the number of channels. A larger case would allow more relay modules There are 8 unsed GPIO pins on the Pico so plenty of room for expansion. It is interesting to note the 4 relay module is low active while the 1 relay module is high active. The same manufacuturer produces both modules.

The Capacitive Touch sensor has been used successfully in other projects and allows control of the device without the chance for water ingress through a switch mechanism. Highly recommend this product.

The OLED display provides basic information, date time, current sensor readings. It also provides a bar graph of sensor readings over the last seven days. But setting controller parameters is only done through the radio link. This is similar to the way commercial smart controllers work.

The case is generally water resistant; the nRF905 attenna socket is the most likely place water would enter.

Software
Raspberry Pi 4, attached LCD screen and wireless keyboard/mouse is used to send commands to the controller. The program is written in Python 3. The Pico program is written in MicroPython. The LCD has a touch screen function but this is not implemented at this time.

The GUI window is basic, provides functionality and could use some improvement in the way it looks. A lot of time was spent learning how to use the Tkinter graphical library.

The OLED has a custom character generator to write 3 lines of 8 characters; much more readable than 8 lines of 16 characters.

Getting the nRF905 modules to communicate using Python was a major achievement and took some figuring out. The Pi 4 program is written as a class definition which makes it useful for any future projects using these modules.

Conclusion
The development of this project was a challenge which is what I wanted.

Writting and testing of two different programs on two different Raspberry Pi’s at the same time through Thonny was interesting.

The programs basically work, but there is room for improvement. The radio comms can cause a crash if the two devices are too far away from each. Checking of the received messages could be improved. The system would work better if the touch screen function of the LCD was used rather than a keyboard and mouse. The look of the GUI needs improvement. Downloading the seven days data and producing a graphical output on the Pi 4 would be nice.

Code & schematic will be placed on this thread at a later date. (schematic is in development)

Regards

Jim

PS May write this up as a Project for submission, eventually.

6 Likes

Hi Jim,

This is amazing!!

It looks like every part of your project is very well considered.
On each of your projects I love the bolt being used to interface with the outside of the case, an awesome idea I’ll have to use for my projects!

PS: I’d also love to see how you are getting those clean fonts on the OLED! They’re shmick!

We’d love to get this on the site!
Liam

1 Like

What a polished project! I love how cleanly those modules fit onto the protoboard, and great props for performing your own weather/rainfall measurements and making it standalone.

What a great application for this sensor - I’ll certainly add this to my bag of tricks.

Do! There’s some real tidy techniques in this build that I’m sure many can learn from :smiley:

2 Likes

This pic shows the Makerverse development board with the Pico and sensors removed. Shows how the wires attach and the use of the breadboard space. Also, how different height right angle connectors allow connections to sit on top of each other. The 3V3 connector sits flat on the board the 6 pin and 5 pin ones sit above the board. Most of the wiring is tucked underneath the Makeverse board giving a more tidy presentation.

@Liam The fonts I cannot claim full rights to. I found some code on the internet that simple draws lines for the characters. I changed it to a class and modified it to suit what I wanted. Code below. Cannot find the link again, should have saved it. The hard part was done by the original developer, determine the x,y cords for all the lines. The PicoDev SDD1306 Large library has just the Pico setup with the Microbit and Linux bits removed to reduce the size of the file.

Initially the screen display was slow, because it was showing the display after each character. Changing that to show when all 3 lines had been written vastly improved the speed.

Regards
Jim

################################
# Large Font on SSD1306 OLED
#
# 3 lines of 8 characters each
################################

from PiicoDev_SSD1306_Large import *

class SSD1306_8x3():
    def __init__(self):
        self.oled = create_PiicoDev_SSD1306()

    def display(self, text, p):
#        print(posArray[0][0])
        for i in range (len(text)):
            x=p[i][0]
            y=p[i][1]
            if text[i]=="A" or text[i]=="a":
                self.oled.line(x+1,y+15,x+5,y+1,1)
                self.oled.line(x+5,y+1,x+10,y+15,1)
                self.oled.line(x+3,y+11,x+8,y+11,1)
            elif text[i]=="B" or text[i]=="b":
                self.oled.line(x+1,y+15,x+1,y+1,1)
                self.oled.line(x+1,y+1,x+6,y+1,1)
                self.oled.line(x+6,y+1,x+8,y+3,1)
                self.oled.line(x+8,y+3,x+8,y+4,1)
                self.oled.line(x+8,y+4,x+6,y+7,1)
                self.oled.line(x+5,y+7,x+1,y+7,1)
                self.oled.line(x+6,y+7,x+9,y+10,1)
                self.oled.line(x+9,y+10,x+9,y+12,1)
                self.oled.line(x+9,y+12,x+6,y+15,1)
                self.oled.line(x+6,y+15,x+1,y+15,1)
            elif text[i]=="C" or text[i]=="c":
                self.oled.line(x+10,y+2,x+9,y+1,1)
                self.oled.line(x+9,y+1,x+4,y+1,1)
                self.oled.line(x+4,y+1,x+2,y+3,1)
                self.oled.line(x+2,y+3,x+1,y+7,1)
                self.oled.line(x+1,y+7,x+1,y+12,1)
                self.oled.line(x+1,y+12,x+4,y+15,1)
                self.oled.line(x+4,y+15,x+8,y+15,1)
                self.oled.line(x+8,y+15,x+10,y+13,1)
            elif text[i]=="D" or text[i]=="d":
                self.oled.line(x+1,y+15,x+1,y+1,1)
                self.oled.line(x+1,y+1,x+6,y+1,1)
                self.oled.line(x+6,y+1,x+9,y+3,1)
                self.oled.line(x+9,y+3,x+9,y+12,1)
                self.oled.line(x+9,y+12,x+6,y+15,1)
                self.oled.line(x+6,y+15,x+1,y+15,1)
            elif text[i]=="E" or text[i]=="e":
                self.oled.line(x+1,y+15,x+1,y+1,1)
                self.oled.line(x+1,y+1,x+9,y+1,1)
                self.oled.line(x+1,y+7,x+7,y+7,1)
                self.oled.line(x+1,y+15,x+9,y+15,1)
            elif text[i]=="F" or text[i]=="f":
                self.oled.line(x+1,y+15,x+1,y+1,1)
                self.oled.line(x+1,y+1,x+9,y+1,1)
                self.oled.line(x+1,y+7,x+6,y+7,1)
            elif text[i]=="G" or text[i]=="g":
                self.oled.line(x+9,y+2,x+8,y+1,1)
                self.oled.line(x+8,y+1,x+4,y+1,1)
                self.oled.line(x+4,y+1,x+2,y+3,1)
                self.oled.line(x+2,y+3,x+1,y+7,1)
                self.oled.line(x+1,y+7,x+1,y+12,1)
                self.oled.line(x+1,y+12,x+4,y+15,1)
                self.oled.line(x+4,y+15,x+8,y+15,1)
                self.oled.line(x+8,y+15,x+10,y+13,1)
                self.oled.line(x+10,y+13,x+10,y+9,1)
                self.oled.line(x+10,y+9,x+6,y+9,1)    
            elif text[i]=="H" or text[i]=="h":
                self.oled.line(x+1,y+15,x+1,y+1,1)
                self.oled.line(x+1,y+7,x+9,y+7,1)
                self.oled.line(x+9,y+15,x+9,y+1,1)
            elif text[i]=="I" or text[i]=="i":
                self.oled.line(x+1,y+1,x+9,y+1,1)
                self.oled.line(x+1,y+15,x+9,y+15,1)
                self.oled.line(x+5,y+15,x+5,y+1,1)
            elif text[i]=="J" or text[i]=="j":
                self.oled.line(x+9,y+1,x+9,y+10,1)
                self.oled.line(x+9,y+10,x+7,y+15,1)
                self.oled.line(x+7,y+15,x+3,y+15,1)
                self.oled.line(x+3,y+15,x+1,y+10,1)
            elif text[i]=="K" or text[i]=="k":
                self.oled.line(x+1,y+15,x+1,y+1,1)
                self.oled.line(x+1,y+9,x+8,y+1,1)
                self.oled.line(x+4,y+7,x+9,y+15,1)
            elif text[i]=="L" or text[i]=="l":
                self.oled.line(x+1,y+15,x+1,y+1,1)
                self.oled.line(x+1,y+15,x+9,y+15,1)
            elif text[i]=="M" or text[i]=="m":
                self.oled.line(x+1,y+15,x+1,y+1,1)
                self.oled.line(x+1,y+1,x+5,y+7,1)
                self.oled.line(x+9,y+1,x+5,y+7,1)
                self.oled.line(x+9,y+15,x+9,y+1,1)
            elif text[i]=="N" or text[i]=="n":
                self.oled.line(x+1,y+15,x+1,y+1,1)
                self.oled.line(x+1,y+1,x+9,y+15,1)
                self.oled.line(x+9,y+15,x+9,y+1,1)
            elif text[i]=="O" or text[i]=="o":
                self.oled.line(x+10,y+5,x+8,y+1,1)
                self.oled.line(x+8,y+1,x+4,y+1,1)
                self.oled.line(x+4,y+1,x+2,y+3,1)
                self.oled.line(x+2,y+3,x+1,y+7,1)
                self.oled.line(x+1,y+7,x+1,y+12,1)
                self.oled.line(x+1,y+12,x+4,y+15,1)
                self.oled.line(x+4,y+15,x+7,y+15,1)
                self.oled.line(x+7,y+15,x+10,y+12,1)
                self.oled.line(x+10,y+12,x+10,y+5,1)
            elif text[i]=="P" or text[i]=="p":
                self.oled.line(x+1,y+15,x+1,y+1,1)
                self.oled.line(x+1,y+1,x+7,y+1,1)
                self.oled.line(x+7,y+1,x+9,y+4,1)
                self.oled.line(x+9,y+4,x+9,y+6,1)
                self.oled.line(x+9,y+6, x+6,y+9,1)
                self.oled.line(x+5,y+9,x+1,y+9,1)
            elif text[i]=="Q" or text[i]=="q":
                self.oled.line(x+10,y+5,x+8,y+1,1)
                self.oled.line(x+8,y+1,x+4,y+1,1)
                self.oled.line(x+4,y+1,x+2,y+3,1)
                self.oled.line(x+2,y+3,x+1,y+7,1)
                self.oled.line(x+1,y+7,x+1,y+12,1)
                self.oled.line(x+1,y+12,x+4,y+15,1)
                self.oled.line(x+4,y+15,x+7,y+15,1)
                self.oled.line(x+7,y+15,x+10,y+12,1)
                self.oled.line(x+10,y+12,x+10,y+5,1)
                self.oled.line(x+6,y+10,x+10,y+15,1)
            elif text[i]=="R" or text[i]=="r":
                self.oled.line(x+1,y+15,x+1,y+1,1)
                self.oled.line(x+1,y+1,x+7,y+1,1)
                self.oled.line(x+7,y+1,x+9,y+4,1)
                self.oled.line(x+9,y+4,x+9,y+6,1)
                self.oled.line(x+9,y+6, x+6,y+9,1)
                self.oled.line(x+5,y+9,x+1,y+9,1)
                self.oled.line(x+5,y+9,x+9,y+15,1)
            elif text[i]=="S" or text[i]=="s":
                self.oled.line(x+9,y+2,x+7,y+1,1)
                self.oled.line(x+7,y+1,x+3,y+1,1)
                self.oled.line(x+3,y+1,x+2,y+2,1)
                self.oled.line(x+3,y+1,x+2,y+2,1)    
                self.oled.line(x+2,y+2,x+1,y+5,1)
                self.oled.line(x+1,y+5,x+5,y+7,1)
                self.oled.line(x+5,y+7,x+9,y+8,1)
                self.oled.line(x+9,y+8,x+10,y+11,1)
                self.oled.line(x+10,y+11,x+10,y+13,1)
                self.oled.line(x+10,y+13,x+7,y+15,1)
                self.oled.line(x+7,y+15,x+4,y+15,1)
                self.oled.line(x+4,y+15,x+1,y+13,1)
            elif text[i]=="T" or text[i]=="t":
                self.oled.line(x+5,y+15,x+5,y+1,1)
                self.oled.line(x+1,y+1,x+9,y+1,1)
            elif text[i]=="U" or text[i]=="u":
                self.oled.line(x+1,y+1,x+1,y+13,1)
                self.oled.line(x+1,y+13,x+3,y+15,1)
                self.oled.line(x+3,y+15,x+7,y+15,1)
                self.oled.line(x+7,y+15,x+9,y+13,1)
                self.oled.line(x+9,y+13,x+9,y+1,1)
            elif text[i]=="V" or text[i]=="v":
                self.oled.line(x+1,y+1,x+5,y+15,1)
                self.oled.line(x+5,y+15,x+9,y+1,1)
            elif text[i]=="W" or text[i]=="w":
                self.oled.line(x+1,y+1,x+3,y+15,1)
                self.oled.line(x+3,y+15,x+5,y+8,1)
                self.oled.line(x+5,y+8,x+8,y+15,1)
                self.oled.line(x+8,y+15,x+10,y+1,1)
            elif text[i]=="X" or text[i]=="x":
                self.oled.line(x+1,y+1,x+9,y+15,1)
                self.oled.line(x+9,y+1,x+1,y+15,1)
            elif text[i]=="Y" or text[i]=="y":
                self.oled.line(x+5,y+15,x+5,y+7,1)
                self.oled.line(x+5,y+7,x+1,y+1,1)
                self.oled.line(x+5,y+7,x+10,y+1,1)
            elif text[i]=="Z" or text[i]=="z":
                self.oled.line(x+1,y+1,x+9,y+1,1)
                self.oled.line(x+1,y+15,x+9,y+1,1)
                self.oled.line(x+1,y+15,x+9,y+15,1)
            elif text[i]==".":
                self.oled.line(x+1,y+14,x+2,y+14,1)
                self.oled.line(x+1,y+15,x+2,y+15,1)
            elif text[i]=="!":
                self.oled.line(x+1,y+14,x+1,y+15,1)
                self.oled.line(x+1,y+1,x+1,y+10,1)
            elif text[i]=="?":
                self.oled.line(x+5,y+14,x+6,y+14,1)
                self.oled.line(x+5,y+15,x+6,y+15,1)
                self.oled.line(x+5,y+10,x+5,y+8,1)
                self.oled.line(x+5,y+8,x+8,y+6,1)
                self.oled.line(x+8,y+6,x+9,y+2,1)
                self.oled.line(x+8,y+1,x+4,y+1,1)
            elif text[i]=="/":
                self.oled.line(x+9,y+1,x+1,y+15,1)
            elif text[i]==":":
                self.oled.line(x+1,y+14,x+2,y+14,1)
                self.oled.line(x+1,y+15,x+2,y+15,1)
                self.oled.line(x+1,y+6,x+2,y+6,1)
                self.oled.line(x+1,y+5,x+2,y+5,1)
            elif text[i]==",":
                self.oled.line(x+1,y+13,x+1,y+14,1)
                self.oled.line(x+2,y+13,x+2,y+17,1)
                self.oled.line(x+1,y+17,x+2,y+17,1)
            elif text[i]=="&":
                self.oled.line(x+4,y+7,x+2,y+5,1)
                self.oled.line(x+2,y+5,x+2,y+3,1)
                self.oled.line(x+2,y+3,x+3,y+2,1)
                self.oled.line(x+3,y+2,x+4,y+1,1)
                self.oled.line(x+4,y+1,x+6,y+1,1)
                self.oled.line(x+6,y+1,x+7,y+2,1)
                self.oled.line(x+7,y+2,x+8,y+3,1)
                self.oled.line(x+8,y+3,x+8,y+4,1)
                self.oled.line(x+8,y+4,x+6,y+6,1)
                self.oled.line(x+6,y+6,x+1,y+10,1)
                self.oled.line(x+1,y+10,x+1,y+13,1)
                self.oled.line(x+1,y+13,x+3,y+15,1)
                self.oled.line(x+3,y+15,x+6,y+15,1)
                self.oled.line(x+6,y+15,x+9,y+9,1)
                self.oled.line(x+4,y+8,x+10,y+15,1)
            elif text[i]=="+":
                self.oled.line(x+5,y+5,x+5,y+11,1)
                self.oled.line(x+2,y+8,x+8,y+8,1)
            elif text[i]=="-":
                self.oled.line(x+2,y+8,x+8,y+8,1)
            elif text[i]=="=":
                self.oled.line(x+2,y+6,x+8,y+6,1)
                self.oled.line(x+2,y+9,x+8,y+9,1)
            elif text[i]=="0":
                self.oled.line(x+10,y+5,x+8,y+1,1)
                self.oled.line(x+8,y+1,x+4,y+1,1)
                self.oled.line(x+4,y+1,x+2,y+3,1)
                self.oled.line(x+2,y+3,x+1,y+7,1)
                self.oled.line(x+1,y+7,x+1,y+12,1)
                self.oled.line(x+1,y+12,x+4,y+15,1)
                self.oled.line(x+4,y+15,x+7,y+15,1)
                self.oled.line(x+7,y+15,x+10,y+12,1)
                self.oled.line(x+10,y+12,x+10,y+5,1)
                self.oled.line(x+9,y+4,x+2,y+12,1)
            elif text[i]=="1":
                self.oled.line(x+5,y+15,x+5,y+1,1)
                self.oled.line(x+5,y+1,x+2,y+3,1)
            elif text[i]=="2":
                self.oled.line(x+1,y+3,x+2,y+1,1)
                self.oled.line(x+2,y+1,x+7,y+1,1)    
                self.oled.line(x+7,y+1,x+9,y+3,1)
                self.oled.line(x+9,y+3,x+9,y+6,1)
                self.oled.line(x+9,y+6,x+2,y+13,1)
                self.oled.line(x+2,y+13,x+1,y+15,1)
                self.oled.line(x+1,y+15,x+10,y+15,1)
            elif text[i]=="3":
                self.oled.line(x+1,y+3,x+2,y+1,1)
                self.oled.line(x+2,y+1,x+7,y+1,1)    
                self.oled.line(x+7,y+1,x+9,y+3,1)
                self.oled.line(x+9,y+3,x+9,y+5,1)
                self.oled.line(x+9,y+5,x+7,y+7,1)
                self.oled.line(x+7,y+7,x+4,y+7,1)    
                self.oled.line(x+7,y+8,x+9,y+9,1)
                self.oled.line(x+9,y+9,x+9,y+12,1)
                self.oled.line(x+9,y+12,x+7,y+15,1)
                self.oled.line(x+7,y+15,x+3,y+15,1)
                self.oled.line(x+3,y+15,x+1,y+13,1)    
            elif text[i]=="4":
                self.oled.line(x+8,y+1,x+8,y+15,1)
                self.oled.line(x+1,y+1,x+1,y+7,1)
                self.oled.line(x+1,y+7,x+9,y+7,1)
            elif text[i]=="5":
                self.oled.line(x+9,y+1,x+1,y+1,1)
                self.oled.line(x+1,y+1,x+1,y+7,1)
                self.oled.line(x+7,y+7,x+1,y+7,1)    
                self.oled.line(x+7,y+8,x+9,y+9,1)
                self.oled.line(x+9,y+9,x+9,y+12,1)
                self.oled.line(x+9,y+12,x+7,y+15,1)
                self.oled.line(x+7,y+15,x+3,y+15,1)
                self.oled.line(x+3,y+15,x+1,y+13,1)
            elif text[i]=="6":
                self.oled.line(x+10,y+3,x+8,y+1,1)
                self.oled.line(x+8,y+1,x+4,y+1,1)
                self.oled.line(x+4,y+1,x+2,y+3,1)
                self.oled.line(x+2,y+3,x+1,y+7,1)
                self.oled.line(x+1,y+7,x+1,y+12,1)
                self.oled.line(x+1,y+12,x+4,y+15,1)
                self.oled.line(x+4,y+15,x+7,y+15,1)
                self.oled.line(x+7,y+15,x+10,y+13,1)
                self.oled.line(x+10,y+13,x+10,y+9,1)
                self.oled.line(x+10,y+9,x+8,y+7,1)
                self.oled.line(x+8,y+7,x+4,y+7,1)
                self.oled.line(x+4,y+7,x+2,y+9,1)
            elif text[i]=="7":
                self.oled.line(x+1,y+1,x+10,y+1,1)
                self.oled.line(x+10,y+1,x+3,y+15,1)
            elif text[i]=="8":
                self.oled.line(x+4,y+7,x+2,y+5,1)
                self.oled.line(x+2,y+5,x+2,y+3,1)
                self.oled.line(x+2,y+3,x+3,y+2,1)
                self.oled.line(x+3,y+2,x+4,y+1,1)
                self.oled.line(x+4,y+1,x+6,y+1,1)
                self.oled.line(x+6,y+1,x+7,y+2,1)
                self.oled.line(x+7,y+2,x+8,y+3,1)
                self.oled.line(x+8,y+3,x+8,y+5,1)
                self.oled.line(x+8,y+5,x+6,y+7,1)
                self.oled.line(x+1,y+10,x+1,y+13,1)
                self.oled.line(x+1,y+13,x+3,y+15,1)
                self.oled.line(x+3,y+15,x+7,y+15,1)
                self.oled.line(x+7,y+15,x+9,y+13,1)
                self.oled.line(x+9,y+13,x+9,y+10,1)
                self.oled.line(x+9,y+10,x+6,y+7,1)
                self.oled.line(x+6,y+7,x+4,y+7,1)
                self.oled.line(x+4,y+7,x+2,y+9,1)
            elif text[i]=="9":
                self.oled.line(x+10,y+6,x+8,y+8,1)
                self.oled.line(x+8,y+8,x+3,y+8,1)
                self.oled.line(x+3,y+8,x+1,y+5,1)
                self.oled.line(x+1,y+5,x+1,y+3,1)
                self.oled.line(x+1,y+3,x+3,y+1,1)
                self.oled.line(x+3,y+1,x+8,y+1,1)
                self.oled.line(x+8,y+1,x+10,y+3,1)
                self.oled.line(x+10,y+3,x+10,y+10,1)
                self.oled.line(x+10,y+10,x+9,y+13,1)
                self.oled.line(x+9,y+13,x+7,y+15,1)
                self.oled.line(x+7,y+15,x+3,y+15,1)
                self.oled.line(x+3,y+15,x+1,y+13,1)
            elif text[i]==" ":
                pass
#        self.oled.show()
        return

    def line1(self, line1text):
        self.display(line1text, [(0,0), (15,0), (30,0), (45,0), (60,0), (75,0), (90,0), (105,0)])
        return

    def line2(self, line2text):
        self.display(line2text, [(0,22),(15,22),(30,22),(45,22),(60,22),(75,22),(90,22),(105,22)])
        return

    def line3(self, line3text):
        self.display(line3text, [(0,44),(15,44),(30,44),(45,44),(60,44),(75,44),(90,44),(105,44)])
        return
    
    def draw_pixel(self, x, y):
        self.oled.pixel(x,y,1)
#        self.oled.show()
        
    def draw_line(self, x1, y1, x2, y2):
        self.oled.line(x1,y1,x2,y2,1)
#        self.oled.show()

    def Clear(self):
        self.oled.fill(0)
        self.oled.show()
        return

    def Show(self):
        self.oled.show()
        return
    
"""
def wrap(string):
    if len(string)> 8:
        spaceArray = []
        cut1 = 23
        cut2 = 23
        cut3 = 23
        for character in range (len(string)):
            if string[character] == " ":
                spaceArray.append(character)
        for i in range (len(spaceArray)):    
            if spaceArray[i] < 8 :
                cut1= spaceArray[i]
                #cut[0]=space
            
            if 8 < spaceArray[i] < 16 :
                cut2=spaceArray[i]
               
            if 16 < spaceArray[i] < 24 :
                cut3=spaceArray[i]
              
        line1(string[0:(cut1)])
        line2(string[(cut1+1):(cut2)])
        line3(string[(cut2+1):(cut3)])
        
    else:
        line1(string)
    #line2(line2text)
    #line3(line3text)
    return
"""
2 Likes

Sent this as a project today.

2 Likes