-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathOutput.py
More file actions
29 lines (22 loc) · 782 Bytes
/
Output.py
File metadata and controls
29 lines (22 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import Adafruit_CharLCD as LCD
import Adafruit_BBIO.GPIO as GPIO
"""
1602A LCD
"""
class CharLCD:
def __init__(self):
self.lcd = LCD.Adafruit_CharLCD('P8_8', 'P8_10', 'P8_18', 'P8_16', 'P8_14', 'P8_12', 16, 2, 'P8_26')
def print(self,msg):
self.clear()
self.lcd.message(msg)
def mic_err(self):
self.print("Failed to\nConnect to Mic\n")
def rec_error(self):
self.print("Failed to\nSave Audio\n")
def len_error(self):
self.print("Recording Length\nExceeded\n")
def clear(self):
self.lcd.clear()
def Cleanup(self):
self.clear()
GPIO.cleanup()