Je suis en train de programmer un moniteur cardiaque AD8232 à l'aide d'un Raspberry PI. Autant que je sache, j'ai tous les bons paquets installés pour les publicités ump et ADC1115. Le problème que j'ai est quand j'essaye d'exécuter le code j'obtiens une erreur de valeur: File "/ usr/lib/python2.7/cart-paquets/upm/pyupm_ad8232.py", ligne 170, dans init this = _pyupm_ad8232.new_AD8232 (loPlus, loMinus, output, aref) ValueError: Argument UPM invalide: Pin AIO non valide spécifié - avez-vous un ADC? Quelqu'un peut-il aider avec ce problème, le script python que j'utilise est ci-dessous Merci.Raspberry PI AD8232
#!/usr/bin/env python3
from __future__ import print_function
import time, sys, signal, atexit
from upm import pyupm_ad8232 as upmAD8232
from upm import pyupm_ads1x15 as upm
def main():
# Instantiate a AD8232 sensor on digital pins 10 (LO+), 11 (LO-)
# and an analog pin, 0 (OUTPUT)
myAD8232 = upmAD8232.AD8232(10, 11, 8)
## Exit handlers ##
# This function stops python from printing a stacktrace when you hit
def SIGINTHandler(signum, frame):
raise SystemExit
# This function lets you run code on exit, including functions from myAD8232
def exitHandler():
print("Exiting")
sys.exit(0)
# Register exit handlers
atexit.register(exitHandler)
signal.signal(signal.SIGINT, SIGINTHandler)
# Output the raw numbers from the ADC, for plotting elsewhere.
# A return of 0 indicates a Lead Off (LO) condition.
# In theory, this data could be fed to software like Processing
# (https://www.processing.org/) to plot the data just like an
# EKG you would see in a hospital.
while(1):
print(myAD8232.value())
time.sleep(.001)
if __name__ == '__main__':
main()