def __init__(self, title, index): self.title = title self.menuIndex = index self.prevMenu = self self.subMenuObj = [] self.display = lcddriver.lcd() self.button = keypaddriver.keypad()
import smbus import time #from time import sleep import pandas as pd import RPi.GPIO as GPIO import dbtask import lcddriver import keypaddriver import time bus = smbus.SMBus(1) display = lcddriver.lcd() button = keypaddriver.keypad() class ModuleControl(object): modulenest = {}# = {'0x10': ('0x10', 'ph','actuator',0x02,'linear',0x04)} autocon = {}#{'0x10': True} sensors = [] targetData = {}#{'0x09': 7, '0x57': 15} currentData = {} sensorfq = None testing = [] def __init__(self, busnum): self.bus = smbus.SMBus(busnum) self.df = pd.read_csv('moduledata.csv') self.index = list(self.df) #0address,1category,2type,3actu_run,4control_model,5get_actu_status,6sensor_run #db = dbtask.DBtask('../../mandellion5/mandellion5/db.sqlite3')