2017-02-20 19 views
1

私はラズベリーPIを使用してAD8232心臓モニターをプログラムしようとしていますが、umpとADC ads1115用にすべての適切なパッケージがインストールされています。私が抱えている問題は、私が値のエラーを取得するコードを実行しようとするときです ファイル "/usr/lib/python2.7/dist-packages/upm/pyupm_ad8232.py"、170行目、initで this = _upupm_ad8232.new_AD8232(loPlus、loMinus、output、aref) ValueError:UPM無効な引数:無効なAIOピンが指定されています - ADCはありますか? 誰でもこの問題を助けることができます、私が使用しているPythonスクリプトは以下です ありがとうございます。ラズベリー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() 

答えて

0

あなたはADS 1110

のA0ピンにADS 1110または1115を使用してn個ラズベリーとの接続を行い、心拍センサーのピンアウトすることができます
関連する問題