************************* adcValue.py ************************* Date: 2022FJun10 adcValue variable is used in vMeterIXA_pico.py to read the voltage also used: RAPasc() readADC_pico(nn,cnvrt=5.035477e-05): stored in Raspberry Pi Pico & pi/pico_4f31_on_Fla53 also see readADC_pico.py in 164.html also see g_adcValue in 174.html also see n.py -a < adcRead_pkg.py # 1 m adcRead_pkg.py # 9 import cmd, time, logging, smbus, RPi.GPIO as GPIO # 11 #Source: https://smartypies.com/projects/ads1115-with-raspberrypi-and-python/ads1115runner/ #DC # 16 # BUS = adcReadInit(I2C_BUS,icNumber) # create BUS class object # 26 def MUX(n): # 34 def swap2Bytes(c): # 39 def prepareLEconf(BEconf): # 45 def LEtoBE(c): # 53 def BEtoLE(c): # 60 def resetChip(RESET_ADDRESS, RESET_COMMAND): # 65 class ADS1115Runner(cmd.Cmd): # 83 def alerted(self, arg): # 90 def do_q(self, arg): # 94 def mydo_1(self,BUS,AINn): # 129 global g_adcValue # 143 def shutdown(self): # 149 #class end ADS1115Runner() # 151 def adcRead(BUS,nChannel=0) : # 162 #Source: https://smartypies.com/projects/ads1115-with-raspberrypi-and-python/ads1115runner/ #DC # 173 # GPIO. for ALERTPIN class is not used #DC # 192 global g_adcValue # 200 def adcReadInit(I2C_BUS=1,icNumber="ADS1115") : # 203 # usage of global variables # 204 # global g_adcValue ************************* /adcValue.py.txt