kizniche / Mycodo

An environmental monitoring and regulation system
http://kylegabriel.com/projects/
GNU General Public License v3.0
2.89k stars 488 forks source link

ADS1256 ADC Input addition #537

Closed SAM26K closed 5 years ago

SAM26K commented 5 years ago

Mycodo Issue Report:

Problem Description

Please list:

    sudo /etc/getch0.sh
    Above command calls the following command:
    sudo python ~/Desktop/ads1256code1/py-ads1256/read_volts_ch0.py

   read_volts_ch0.py contains the following python code:
   import ads1256       # import this lib                             

gain = 1             # ADC's Gain parameter
sps = 25             # ADC's SPS parameter

# Create the first list. It will receive ADC's absolute values
AllChannelValuesVolts = [0,0,0,0,0,0,0,0]       

# Create the second list. It will received absolute values converted to Volts
AllChannelValues = [0,0,0,0,0,0,0,0]        

# Initialize the ADC using the parameters
ads1256.start(str(gain),str(sps))  
#Fill the first list with all the ADC's absolute channel values
AllChannelValues = ads1256.read_all_channels()        
 for i in range(0, 8):
    # Fill the second list  with the voltage values
    AllChannelValuesVolts[i] = (((AllChannelValues[i] * 100) /167.0)/int(gain))/1000000.0   
#for i in range(0, 8):     
#    # Print all the absolute values
#    print AllChannelValues[i]              
# Print a new line
#print ("\n");                             
#for i in range(0, 8):     
    # Print all the Volts values converted from the absolute values
#    print AllChannelValuesVolts[i]
 print AllChannelValuesVolts[0]
# Stop the use of the ADC
ads1256.stop()  

Errors

Steps to Reproduce the issue:

How can this issue be reproduced?

  1. step 1
  2. step 2...
  3. etc

Additional Notes

Is there anything that should be added to make it easier to address this issue?

SAM26K commented 5 years ago

Errors out when selecting "Live". Error log: Error 500: Internal Server Error

Something bad happened but it's probably not your fault. Letting the developers know about these issues is crucial to supporting Mycodo. Please submit a new issue on GitHub with the following error traceback (copy the entire traceback):

Error (Full Traceback): Traceback (most recent call last): File "/home/pi/Mycodo/env/lib/python3.5/site-packages/flask/app.py", line 2292, in wsgi_app response = self.full_dispatch_request() File "/home/pi/Mycodo/env/lib/python3.5/site-packages/flask/app.py", line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/pi/Mycodo/env/lib/python3.5/site-packages/flask/app.py", line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/pi/Mycodo/env/lib/python3.5/site-packages/flask/_compat.py", line 35, in reraise raise value File "/home/pi/Mycodo/env/lib/python3.5/site-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/home/pi/Mycodo/env/lib/python3.5/site-packages/flask/app.py", line 1799, in dispatch_request return self.view_functionsrule.endpoint File "/home/pi/Mycodo/env/lib/python3.5/site-packages/flask_login/utils.py", line 261, in decorated_view return func(*args, **kwargs) File "/home/pi/Mycodo/mycodo/mycodo_flask/routes_page.py", line 994, in page_live use_unit=use_unit) File "/home/pi/Mycodo/env/lib/python3.5/site-packages/flask/templating.py", line 135, in render_template context, ctx.app) File "/home/pi/Mycodo/env/lib/python3.5/site-packages/flask/templating.py", line 117, in _render rv = template.render(context) File "/home/pi/Mycodo/env/lib/python3.5/site-packages/jinja2/environment.py", line 1008, in render return self.environment.handle_exception(exc_info, True) File "/home/pi/Mycodo/env/lib/python3.5/site-packages/jinja2/environment.py", line 780, in handle_exception reraise(exc_type, exc_value, tb) File "/home/pi/Mycodo/env/lib/python3.5/site-packages/jinja2/_compat.py", line 37, in reraise raise value.with_traceback(tb) File "/home/pi/Mycodo/mycodo/mycodo_flask/templates/pages/live.html", line 3, in top-level template code {% set helppage = ["live-measurements", ('Live Measurements')] %} File "/home/pi/Mycodo/mycodo/mycodo_flask/templates/layout.html", line 256, in top-level template code {%- block body %}{% endblock -%} File "/home/pi/Mycodo/mycodo/mycodo_flask/templates/pages/live.html", line 129, in block "body" 0.0 {% if use_unit[each_input.unique_id][each_measure] and use_unit[each_input.unique_id][each_measure] in dict_units %}{{dict_units[use_unit[each_input.unique_id][each_measure]]['unit']}}{% endif %} ({{dict_measurements[each_measure]['name']}}) | <{{_('Please wait')}}>
File "/home/pi/Mycodo/env/lib/python3.5/site-packages/jinja2/environment.py", line 411, in getitem return obj[argument] jinja2.exceptions.UndefinedError: 'collections.OrderedDict object' has no attribute ''

SAM26K commented 5 years ago

Code is modified version of py-ads1256/read_volts_examply.py available on github. When executed from a terminal on the pi itself (pi3B) it works fine and returns the voltage for channel 0 only one time. If I use the "Linux command" input function, it generates above error when "Live" tab is clicked.

SAM26K commented 5 years ago

Sorry didn't mean to close issue.

SAM26K commented 5 years ago

Code borrowed from here: https://github.com/fabiovix/py-ads1256

SAM26K commented 5 years ago

Using this RPi shield PCB: https://www.amazon.com/Raspberry-Expansion-High-Precision-Functions-Interface/dp/B071JGZM4B/ref=pd_lpo_sbs_147_img_1?_encoding=UTF8&psc=1&refRID=86DDDF05ZWS6N44E88JJ

SAM26K commented 5 years ago

Sorry, this is the first time Im posting on github. Here; is second attempt to post the modified python module code to get the voltage from one channel:

import ads1256       # import this lib                             

gain = 1             # ADC's Gain parameter
sps = 25             # ADC's SPS parameter

# Create the first list. It will receive ADC's absolute values
AllChannelValuesVolts = [0,0,0,0,0,0,0,0]       

# Create the second list. It will received absolute values converted to Volts
AllChannelValues = [0,0,0,0,0,0,0,0]        

# Initialize the ADC using the parameters
ads1256.start(str(gain),str(sps))  

# Fill the first list with all the ADC's absolute channel values
AllChannelValues = ads1256.read_all_channels()        

for i in range(0, 8):
    # Fill the second list  with the voltage values
    AllChannelValuesVolts[i] = (((AllChannelValues[i] * 100) /167.0)/int(gain))/1000000.0   

#for i in range(0, 8):     
#    # Print all the absolute values
#    print AllChannelValues[i]              

# Print a new line
#print ("\n");                             

#for i in range(0, 8):     
    # Print all the Volts values converted from the absolute values
#    print AllChannelValuesVolts[i]

print AllChannelValuesVolts[0]
SAM26K commented 5 years ago

That didn't work any better than the first attempt, Don't understand the weird formatting. the bold print is not what I pasted so ignore those bits.

kizniche commented 5 years ago

Thanks. I'll look into the issues and integrating the ADC

kizniche commented 5 years ago

I fixed this issue with the Linux Command input, however, after you've updated to the latest release (not yet released), you will have to deactivate your controller, save the settings again, then reactivate it for it to be fixed.

kizniche commented 5 years ago

I'll also work on adding this ADC to the builtin inputs.

kizniche commented 5 years ago

I just added the ADC module. You will be able to test it once I make the 6.4.0 release, which could be any day now (maybe even today; I'm not sure how much progress I'll make today toward a release, but I've had a pretty successful bug hunt so far).

SAM26K commented 5 years ago

Thank you very much for all your hard work. Is there a way to force the upgrade? If so, how?

On Mon, Oct 8, 2018 at 2:24 PM Kyle Gabriel notifications@github.com wrote:

I just added the ADC module. You will be able to test it once I make the 6.4.0 release, which could be any day now (even today, I'm not sure how much progress I'll make today toward a release, but I've had a pretty successful bug hunt so far).

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/kizniche/Mycodo/issues/537#issuecomment-427983879, or mute the thread https://github.com/notifications/unsubscribe-auth/AVEVjeyvS8y7v6twtARDI9avUIP_Jrztks5ui8J8gaJpZM4XBeMO .

kizniche commented 5 years ago

You can upgrade to the master branch with the instructions at https://github.com/kizniche/Mycodo/wiki/Updating-to-Github-Master-Branch

When the new release comes out, you will be able to upgrade from this version in the normal way via the upgrade page.

SAM26K commented 5 years ago

Hi Kylem I just tried to do a master upgrade and it failed. Tried a second time with a complete reinstall and has the same issue. Gives the following feedback:

[2018-10-11 06:22:56] #### Continuing Upgrade: Stage 2 of 2 #### [2018-10-11 06:22:56] [2018-10-11 06:22:56] Moving old Mycodo from /home/pi/Mycodo to /var/Mycodo-backups/Mycodo-backup-2018-10-11_06-21-31-6.3.9...Done. [2018-10-11 06:22:56] Moving new Mycodo from /tmp/Mycodo-6.3.9 to /home/pi/Mycodo...Done. [2018-10-11 06:23:26] [2018-10-11 06:23:26] #### Upgrading Mycodo database with alembic (if needed) [2018-10-11 06:23:33] Failed: Error while updating database with alembic. [2018-10-11 06:23:33] [2018-10-11 06:23:33] [2018-10-11 06:23:33] There was an error during the upgrade. [2018-10-11 06:23:33] Initial steps to try to fix: [2018-10-11 06:23:33] 1. Reboot [2018-10-11 06:23:33] 2. If that doesn't fix the issue, run the following command: [2018-10-11 06:23:33] sudo /bin/bash ~/Mycodo/mycodo/scripts/upgrade_commands.sh upgrade [2018-10-11 06:23:33] 3. If that command returns that you are running the latest version, run the following command: [2018-10-11 06:23:33] sudo /bin/bash ~/Mycodo/mycodo/scripts/upgrade_post.sh

On Wed, Oct 10, 2018 at 9:37 AM Kyle Gabriel notifications@github.com wrote:

You can upgrade to the master branch with the instructions at https://github.com/kizniche/Mycodo/wiki/Updating-to-Github-Master-Branch

When the new release comes out, you will be able to upgrade from this version in the normal way via the upgrade page.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/kizniche/Mycodo/issues/537#issuecomment-428642922, or mute the thread https://github.com/notifications/unsubscribe-auth/AVEVjcKJvriHERHpJibY6BbSlokM9Zprks5ujiJdgaJpZM4XBeMO .

kizniche commented 5 years ago

What was the error encountered during the fresh install? Your log excerpt is only from the upgrade.

SAM26K commented 5 years ago

A fresh install from scratch works ok. It's only the master upgrade generates the error. Also tried the 123 steps in the upgrade error feedback. Attached are log files, Thanks again,

On Thu, Oct 11, 2018 at 7:08 AM Kyle Gabriel notifications@github.com wrote:

What was the error encountered during the fresh install? Your log excerpt is only from the upgrade.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/kizniche/Mycodo/issues/537#issuecomment-428963848, or mute the thread https://github.com/notifications/unsubscribe-auth/AVEVjYn3s-JYdJfRtqNukRMZZXUBZk6Nks5uj1DugaJpZM4XBeMO .

kizniche commented 5 years ago

So your fresh install works (fresh installs install from the latest release, not the master branch). Have you attempted an upgrade to the master branch after the fresh install?

SAM26K commented 5 years ago

Just tried a third time. Complete reinstall of mycoda works ok but force upgrade to master branch causes errors. If I click on dashboard tab it generates a 500 error after upgrading, The upgrade worked once yesterday or the day before but couldn't get the waveshare a/d working. I noticed you had done some more updates to the master so tried to upgrade again and now have these errors.

On Thu, Oct 11, 2018 at 8:37 AM Kyle Gabriel notifications@github.com wrote:

So your fresh install works (fresh installs install from the latest release, not the master branch). Have you attempted an upgrade to the master branch after the fresh install?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/kizniche/Mycodo/issues/537#issuecomment-429001743, or mute the thread https://github.com/notifications/unsubscribe-auth/AVEVjfUa6ejhxyaPDHbF8FzRJDDAs3Kvks5uj2WkgaJpZM4XBeMO .

kizniche commented 5 years ago

Can you paste the contents of the upgrade log?

SAM26K commented 5 years ago

Attached are the log files. Is that ok?

On Thu, Oct 11, 2018 at 8:47 AM Kyle Gabriel notifications@github.com wrote:

Can you paste the contents of the upgrade log?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/kizniche/Mycodo/issues/537#issuecomment-429007133, or mute the thread https://github.com/notifications/unsubscribe-auth/AVEVjXB3a5hJh7SdabSkhC5kZK76M7v1ks5uj2gWgaJpZM4XBeMO .

kizniche commented 5 years ago

Sorry, but you'll have to log on to github.com to attach files. You can't do it by replying to the email notification. Thanks.

SAM26K commented 5 years ago

Oh ok. Here it is:

Edit: Deleted by Kyle Gabriel (too long)

kizniche commented 5 years ago

From your log, above, you were performing an upgrade from 6.2.2 to 6.3.9, not upgrading to the master branch from a fresh install of the latest release (v6.3.9).

[2018-09-30 23:25:38] Installed version: 6.2.2 
[2018-09-30 23:25:38] Latest version: 6.3.9
kizniche commented 5 years ago

When upgrading to the master branch, the first line of the upgrade log (excerpt) will be:

Upgrade script executed with the 'force-upgrade-master' argument. Upgrading from github repo master.
kizniche commented 5 years ago

You happened to have caught me right as I am making the 6.4.0 release. It's now released, so you can either upgrade normally or perform a fresh install to get it.

kizniche commented 5 years ago

I found an issue with the database upgrade. hold off on installing/upgrading

kizniche commented 5 years ago

v6.4.1 released that fixes the database upgrade issue

kizniche commented 5 years ago

You can probably restore your previous install that worked and go through the normal upgrade and it will work (and preserve your previous settings so you don't have to start anew).

SAM26K commented 5 years ago

Hi Kyle, That worked. Clean install but still have a problem with ADS1256. Device not found error after clicking 'activate' on the add data page. Here is the last few lines of the log file. You did write the code for the waveshare shield PCB and not just the chip right?

2018-10-11 10:01:59,664 - mycodo.daemon - INFO - Mycodo daemon v6.4.1 starting 2018-10-11 10:02:01,309 - mycodo.daemon - INFO - Anonymous statistics enabled 2018-10-11 10:02:01,374 - mycodo.daemon - INFO - Starting rpyc server 2018-10-11 10:02:10,489 - mycodo.output - INFO - Output controller activated in 252.6 ms 2018-10-11 10:02:10,991 - mycodo.daemon - INFO - All activated Conditional controllers started 2018-10-11 10:02:10,993 - mycodo.daemon - INFO - All activated Input controllers started 2018-10-11 10:02:10,993 - mycodo.daemon - INFO - All activated Math controllers started 2018-10-11 10:02:10,995 - mycodo.daemon - INFO - All activated PID controllers started 2018-10-11 10:02:10,996 - mycodo.daemon - INFO - All activated LCD controllers started 2018-10-11 10:02:11,497 - mycodo.daemon - INFO - Mycodo daemon v6.4.1 started in 3.471 seconds 2018-10-11 10:02:11,508 - mycodo.daemon - INFO - 38.06 MB RAM in use 2018-10-11 10:05:51,592 - mycodo.daemon - ERROR - Could not activate Input controller with ID 0afab39b-a337-4780-b5ea-ec45edb3d9df: /home/pi/Mycodo/env/src/ads1256/ads1256.cpython-35m-arm-linux-gnueabihf.so: undefined symbol: Py_InitModule3 Traceback (most recent call last): File "/var/mycodo-root/mycodo/mycodo_daemon.py", line 507, in controller_activate ready, cont_id) File "/var/mycodo-root/mycodo/controller_input.py", line 182, in init self.adc = input_loaded.ADCModule(self.input_dev) File "/home/pi/Mycodo/mycodo/inputs/ads1256_input.py", line 74, in init import ads1256 ImportError: /home/pi/Mycodo/env/src/ads1256/ ads1256.cpython-35m-arm-linux-gnueabihf.so: undefined symbol: Py_InitModule3

https://www.waveshare.com/product/mini-pc/raspberry-pi/hats/high-precision-ad-da-board.htm

Thanks again.

kizniche commented 5 years ago

When you attempted to add the Input, did it prompt you to install bcm2835 and ads1256? Could you paste the dependency log of it installing these libraries?

kizniche commented 5 years ago

It appears to be an issue with the driver you initially linked. It is developed for python 2.7, however Mycodo runs on python 3.5. Exploring options to fix this.

SAM26K commented 5 years ago

it did prompt to install ads1256. I think bcm2835 is already installed. Here's the dependency log:

[2018-10-10 14:37:16] Dependency installation beginning. Installing: ads1256

[2018-10-10 14:37:17] [2018-10-10 14:37:17] #### Installing/updating git:// github.com/fabiovix/py-ads1256.git#egg=ads1256 (pip-git) [2018-10-10 14:37:23] Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple [2018-10-10 14:37:23] Obtaining ads1256 from git+git:// github.com/fabiovix/py-ads1256.git#egg=ads1256 [2018-10-10 14:37:23] Cloning git://github.com/fabiovix/py-ads1256.git to ./env/src/ads1256 [2018-10-10 14:37:28] Installing collected packages: unknown [2018-10-10 14:37:28] Found existing installation: UNKNOWN 0.0.0 [2018-10-10 14:37:28] Not uninstalling unknown at /usr/local/lib/python3.5/dist-packages, outside environment /home/pi/Mycodo/env [2018-10-10 14:37:28] Can't uninstall 'UNKNOWN'. No files were found to uninstall. [2018-10-10 14:37:28] Running setup.py develop for unknown [2018-10-10 14:37:38] Successfully installed unknown

[2018-10-10 14:37:38] Successfully installed ads1256

[2018-10-10 14:37:39] [2018-10-10 14:37:39] #### Setting permissions

[2018-10-10 14:37:42] #### All Dependencies have been installed.

[2018-10-11 09:49:46] Dependency installation beginning. Installing: ads1256

[2018-10-11 09:49:46] [2018-10-11 09:49:46] #### Installing/updating git:// github.com/fabiovix/py-ads1256.git#egg=ads1256 (pip-git) [2018-10-11 09:49:54] Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple [2018-10-11 09:49:54] Obtaining ads1256 from git+git:// github.com/fabiovix/py-ads1256.git#egg=ads1256 [2018-10-11 09:49:54] Cloning git://github.com/fabiovix/py-ads1256.git to ./env/src/ads1256 [2018-10-11 09:50:00] Installing collected packages: unknown [2018-10-11 09:50:00] Found existing installation: UNKNOWN 0.0.0 [2018-10-11 09:50:00] Not uninstalling unknown at /usr/local/lib/python3.5/dist-packages, outside environment /home/pi/Mycodo/env [2018-10-11 09:50:00] Can't uninstall 'UNKNOWN'. No files were found to uninstall. [2018-10-11 09:50:00] Running setup.py develop for unknown [2018-10-11 09:50:08] Successfully installed unknown

[2018-10-11 09:50:09] Successfully installed ads1256

[2018-10-11 09:50:10] [2018-10-11 09:50:10] #### Setting permissions

[2018-10-11 09:50:13] #### All Dependencies have been installed.

On Thu, Oct 11, 2018 at 10:29 AM Kyle Gabriel notifications@github.com wrote:

When you attempted to add the Input, did it prompt you to install bcm2835 and ads1256? Could you paste the dependency log of it installing these libraries?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/kizniche/Mycodo/issues/537#issuecomment-429046036, or mute the thread https://github.com/notifications/unsubscribe-auth/AVEVjYxAKltmYCcoPDGq_mhcc0-VmmWgks5uj3_zgaJpZM4XBeMO .

kizniche commented 5 years ago

It appears the ADS1256 library didn't compile properly, according to your log. It looks very odd. I'm still exploring whether I can port the library to Python 3 or find another suitable library.

SAM26K commented 5 years ago

Thanks very much for all your help.

On Thu, Oct 11, 2018 at 10:34 AM Kyle Gabriel notifications@github.com wrote:

It appears the ADS1256 library didn't compile properly, according to your log. It looks very odd. I'm still exploring whether I can port the library to Python 3 or find another suitable library.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/kizniche/Mycodo/issues/537#issuecomment-429048093, or mute the thread https://github.com/notifications/unsubscribe-auth/AVEVjSA-dnKngDsED2ZbISdXCAx6UeSbks5uj4E5gaJpZM4XBeMO .

kizniche commented 5 years ago

Can you test the library at https://github.com/ul-gh/PiPyADC ?

Follow these instructions to test:

sudo /bin/bash ~/Mycodo/mycodo/scripts/upgrade_commands.sh install-wiringpi
cd ~
git clone github.com/ul-gh/PiPyADC
cd PiPyADC

Then try:

~/Mycodo/env/bin/python ./example.py

and

~/Mycodo/env/bin/python ./example_2.py

Edit: You may need to add sudo before the last two commands if you get a "permission denied" error.

kizniche commented 5 years ago

If that doesn't work in python3, there's a python3 library at https://github.com/jaxbulsara/pyadda we can try next.

kizniche commented 5 years ago

Actually, Could you also test the pyadda library as well. Execute the following commands:

~/Mycodo/env/bin/pip install RPi.GPIO
cd ~
git clone github.com/jaxbulsara/pyadda
cd pyadda
~/Mycodo/env/bin/python setup.py install

then try:

~/Mycodo/env/bin/python channel_read_example.py

and

sudo ~/Mycodo/env/bin/python channel_read_example.py
kizniche commented 5 years ago

Please paste the entire output from the last commands that attempt to acquire measurements, as well as any output from previous commands that show any errors. Thanks.

SAM26K commented 5 years ago

Not sure what you mean it never measures because it errors when I try to activate it. Get this message: Error: Could not activate Input controller with ID 0afab39b-a337-4780-b5ea-ec45edb3d9df: /home/pi/Mycodo/env/src/ads1256/ ads1256.cpython-35m-arm-linux-gnueabihf.so: undefined symbol: Py_InitModule3

On Thu, Oct 11, 2018 at 11:31 AM Kyle Gabriel notifications@github.com wrote:

Please paste the entire output from the last commands that attempt to acquire measurements, as well as any output from previous commands that show any errors. Thanks.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/kizniche/Mycodo/issues/537#issuecomment-429069607, or mute the thread https://github.com/notifications/unsubscribe-auth/AVEVjWDTUCkXC3FYB7cR3bEl1Kmb21uIks5uj452gaJpZM4XBeMO .

kizniche commented 5 years ago

I just provided two sets of step-by-step instructions to test two different libraries. I'm not sure what your last comment is in response to, but neither of the two instructions I mentioned requires interacting with the Mycodo interface. The instructions are for the command line.

SAM26K commented 5 years ago

OK I didn't see that email before. Will try now. Thanks.

On Thu, Oct 11, 2018 at 12:55 PM Kyle Gabriel notifications@github.com wrote:

I just provided two step-by-step instructions to test two different libraries. I'm not sure what your last comment is in response to, but neither of the two instructions I mentioned requires interactive with the Mycodo interface. The instructions are for the command line.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/kizniche/Mycodo/issues/537#issuecomment-429096221, or mute the thread https://github.com/notifications/unsubscribe-auth/AVEVjXzW-AQkpI2P80G7lyU207AoSHf3ks5uj6IpgaJpZM4XBeMO .

SAM26K commented 5 years ago

Here's the result for above email: pi@raspberrypi3_2:~ $ sudo /bin/bash ~/Mycodo/mycodo/scripts/upgrade_commands.sh install-wiringpi

Installing wiringpi

Cloning into '/home/pi/Mycodo/install/wiringPi'... remote: Counting objects: 1177, done. remote: Compressing objects: 100% (980/980), done. remote: Total 1177 (delta 822), reused 212 (delta 142) Receiving objects: 100% (1177/1177), 369.48 KiB | 153.00 KiB/s, done. Resolving deltas: 100% (822/822), done. wiringPi Build script

WiringPi Library [UnInstall] [Compile] wiringPi.c [Compile] wiringShift.c [Compile] wiringSerial.c [Compile] piHiPri.c [Compile] piThread.c [Compile] wiringPiSPI.c [Compile] wiringPiI2C.c [Compile] softPwm.c [Compile] softTone.c [Compile] mcp23016.c [Compile] mcp23008.c [Compile] mcp23017.c [Compile] mcp23s08.c [Compile] mcp23s17.c wiringPi.c:1309:21: warning: ‘digitalWrite8Dummy’ defined but not used [-Wunused-function] static void digitalWrite8Dummy (UNU struct wiringPiNodeStruct node, UNU int pin, UNU int value) { return ; } ^~~~~~ wiringPi.c:1308:21: warning: ‘digitalRead8Dummy’ defined but not used [-Wunused-function] static unsigned int digitalRead8Dummy (UNU struct wiringPiNodeStruct node, UNU int UNU pin) { return 0 ; } ^~~~~ [Compile] sr595.c [Compile] pcf8574.c [Compile] pcf8591.c [Compile] mcp3002.c [Compile] mcp3004.c [Compile] mcp4802.c [Compile] mcp3422.c [Compile] max31855.c [Compile] max5322.c [Compile] ads1115.c [Compile] bmp180.c [Compile] sn3218.c [Compile] htu21d.c [Compile] ds18b20.c [Compile] rht03.c [Compile] drcSerial.c [Compile] drcNet.c [Compile] pseudoPins.c [Compile] wpiExtensions.c [Link (Dynamic)] [Install Headers] [Install Dynamic Lib]

WiringPi Devices Library [UnInstall] [Compile] ds1302.c [Compile] maxdetect.c [Compile] piNes.c [Compile] gertboard.c [Compile] piFace.c [Compile] lcd128x64.c [Compile] lcd.c [Compile] scrollPhat.c [Compile] piGlow.c [Link (Dynamic)] [Install Headers] [Install Dynamic Lib]

GPIO Utility [Compile] gpio.c [Compile] readall.c [Link] [Install]

All Done.

NOTE: To compile programs with wiringPi, you need to add: -lwiringPi to your compile line(s) To use the Gertboard, MaxDetect, etc. code (the devLib), you need to also add: -lwiringPiDev to your compile line(s).

pi@raspberrypi3_2:~ $ cd ~ pi@raspberrypi3_2:~ $ git clone github.com/ul-gh/PiPyADC fatal: repository 'github.com/ul-gh/PiPyADC' does not exist pi@raspberrypi3_2:~ $ pi@raspberrypi3_2:~ $ git clone https://github.com/ul-gh/PiPyADC fatal: destination path 'PiPyADC' already exists and is not an empty directory. pi@raspberrypi3_2:~ $ dir ADS1256_py1 Documents Mycodo Public Templates bcm2835-1.55 Downloads oldconffiles py-ads1256 Videos bcm2835-1.55.tar.gz helloworld.c Pictures python_games Desktop Music PiPyADC rpi_qsmhbzlyzi.sh pi@raspberrypi3_2:~ $ cd PiPyADC bash: cd: PiPyADC: Not a directory pi@raspberrypi3_2:~ $ sudo rm -r PiPyADC pi@raspberrypi3_2:~ $ git clone https://github.com/ul-gh/PiPyADC Cloning into 'PiPyADC'... remote: Enumerating objects: 15, done. remote: Counting objects: 100% (15/15), done. remote: Compressing objects: 100% (13/13), done. remote: Total 80 (delta 4), reused 9 (delta 2), pack-reused 65 Unpacking objects: 100% (80/80), done. pi@raspberrypi3_2:~ $ cd PiPyADC pi@raspberrypi3_2:~/PiPyADC $ ~/Mycodo/env/bin/python ./example.py Traceback (most recent call last): File "./example.py", line 13, in from pipyadc import ADS1256 File "/home/pi/PiPyADC/pipyadc.py", line 21, in import wiringpi as wp ImportError: No module named 'wiringpi' pi@raspberrypi3_2:~/PiPyADC $ pi@raspberrypi3_2:~/PiPyADC $ pi@raspberrypi3_2:~/PiPyADC $ ~/Mycodo/env/bin/python ./example_2.py File "./example_2.py", line 102 ads2.drate = DRATE_100 ^ IndentationError: unexpected indent pi@raspberrypi3_2:~/PiPyADC $

On Thu, Oct 11, 2018 at 11:05 AM Kyle Gabriel notifications@github.com wrote:

Can you test the library at https://github.com/ul-gh/PiPyADC ?

Follow these instructions to test:

sudo /bin/bash ~/Mycodo/mycodo/scripts/upgrade_commands.sh install-wiringpi cd ~ git clone github.com/ul-gh/PiPyADC cd PiPyADC

Then try:

~/Mycodo/env/bin/python ./example.py

and

~/Mycodo/env/bin/python ./example_2.py

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/kizniche/Mycodo/issues/537#issuecomment-429060271, or mute the thread https://github.com/notifications/unsubscribe-auth/AVEVjV6RO37fD6Dg2gWI30qCBCh8ldsZks5uj4h_gaJpZM4XBeMO .

SAM26K commented 5 years ago

Here is result of pyadda steps. The last command line,

sudo ~/Mycodo/env/bin/python channel_read_example.py,

was working displaying the analog voltages in a fast loop. I had to hit ctrl c to copy the terminal text and that's when some errors or warnings appeared.

pi@raspberrypi3_2:~ $ git clone https://github.com/jaxbulsara/pyadda Cloning into 'pyadda'... remote: Enumerating objects: 38, done. remote: Total 38 (delta 0), reused 0 (delta 0), pack-reused 38 Unpacking objects: 100% (38/38), done. pi@raspberrypi3_2:~ $ cd pyadda pi@raspberrypi3_2:~/pyadda $ ~/Mycodo/env/bin/python setup.py install running install running build running build_ext building 'pyadda' extension creating build creating build/temp.linux-armv7l-3.5 arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-6waWnr/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -I/home/pi/Mycodo/env/include/python3.5m -c wrapper.c -o build/temp.linux-armv7l-3.5/wrapper.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-6waWnr/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -I/home/pi/Mycodo/env/include/python3.5m -c ADDAlibrary.c -o build/temp.linux-armv7l-3.5/ADDAlibrary.o creating build/lib.linux-armv7l-3.5 arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fdebug-prefix-map=/build/python3.5-6waWnr/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.5/wrapper.o build/temp.linux-armv7l-3.5/ADDAlibrary.o -lbcm2835 -o build/lib.linux-armv7l-3.5/pyadda.cpython-35m-arm-linux-gnueabihf.so running install_lib copying build/lib.linux-armv7l-3.5/pyadda.cpython-35m-arm-linux-gnueabihf.so -> /home/pi/Mycodo/env/lib/python3.5/site-packages running install_egg_info Writing /home/pi/Mycodo/env/lib/python3.5/site-packages/UNKNOWN-0.0.0.egg-info pi@raspberrypi3_2:~/pyadda $

pi@raspberrypi3_2:~/pyadda $ ~/Mycodo/env/bin/python channel_read_example.py Segmentation fault pi@raspberrypi3_2:~/pyadda $

sudo ~/Mycodo/env/bin/python channel_read_example.py

ID= Ok, ASD1256 Chip ID = 0x3 Channel 0 - 1667.686mV Channel 1 - 1702.297mV ^CTraceback (most recent call last): Channel 2 - 1593.012mV File "channel_read_example.py", line 44, in Channel 3 - 1577.654mV Channel 4 - 1649.254mV pass7 - 1151.542mV KeyboardInterrupt Fatal Python error: could not acquire lock for <_io.BufferedWriter name=''> at interpreter shutdown, possibly due to daemon threads

Thread 0x759c3470 (most recent call first): File "channel_read_example.py", line 30 in interruptInterpreter

Current thread 0x76fbb010 (most recent call first): Aborted

On Thu, Oct 11, 2018 at 11:29 AM Kyle Gabriel notifications@github.com wrote:

Actually, Could you also test the pyadda library as well. Execute the following commands:

~/Mycodo/env/bin/pip install RPi.GPIO cd ~ git clone github.com/jaxbulsara/pyadda cd pyadda ~/Mycodo/env/bin/python setup.py install

then try:

~/Mycodo/env/bin/python channel_read_example.py

and

sudo ~/Mycodo/env/bin/python channel_read_example.py

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/kizniche/Mycodo/issues/537#issuecomment-429069108, or mute the thread https://github.com/notifications/unsubscribe-auth/AVEVjYCNrtpW3YCujndtZPx5zEepEnWIks5uj44lgaJpZM4XBeMO .

SAM26K commented 5 years ago

After doing all of the above, activation of an ADS1256 device yields same error as before.

On Fri, Oct 12, 2018 at 1:29 AM John Baxter jbbart03@gmail.com wrote:

Here is result of pyadda steps. The last command line,

sudo ~/Mycodo/env/bin/python channel_read_example.py,

was working displaying the analog voltages in a fast loop. I had to hit ctrl c to copy the terminal text and that's when some errors or warnings appeared.

pi@raspberrypi3_2:~ $ git clone https://github.com/jaxbulsara/pyadda Cloning into 'pyadda'... remote: Enumerating objects: 38, done. remote: Total 38 (delta 0), reused 0 (delta 0), pack-reused 38 Unpacking objects: 100% (38/38), done. pi@raspberrypi3_2:~ $ cd pyadda pi@raspberrypi3_2:~/pyadda $ ~/Mycodo/env/bin/python setup.py install running install running build running build_ext building 'pyadda' extension creating build creating build/temp.linux-armv7l-3.5 arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-6waWnr/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -I/home/pi/Mycodo/env/include/python3.5m -c wrapper.c -o build/temp.linux-armv7l-3.5/wrapper.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-6waWnr/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -I/home/pi/Mycodo/env/include/python3.5m -c ADDAlibrary.c -o build/temp.linux-armv7l-3.5/ADDAlibrary.o creating build/lib.linux-armv7l-3.5 arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fdebug-prefix-map=/build/python3.5-6waWnr/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.5/wrapper.o build/temp.linux-armv7l-3.5/ADDAlibrary.o -lbcm2835 -o build/lib.linux-armv7l-3.5/pyadda.cpython-35m-arm-linux-gnueabihf.so running install_lib copying build/lib.linux-armv7l-3.5/ pyadda.cpython-35m-arm-linux-gnueabihf.so -> /home/pi/Mycodo/env/lib/python3.5/site-packages running install_egg_info Writing /home/pi/Mycodo/env/lib/python3.5/site-packages/UNKNOWN-0.0.0.egg-info pi@raspberrypi3_2:~/pyadda $

pi@raspberrypi3_2:~/pyadda $ ~/Mycodo/env/bin/python channel_read_example.py Segmentation fault pi@raspberrypi3_2:~/pyadda $

sudo ~/Mycodo/env/bin/python channel_read_example.py

ID= Ok, ASD1256 Chip ID = 0x3 Channel 0 - 1667.686mV Channel 1 - 1702.297mV ^CTraceback (most recent call last): Channel 2 - 1593.012mV File "channel_read_example.py", line 44, in Channel 3 - 1577.654mV Channel 4 - 1649.254mV pass7 - 1151.542mV KeyboardInterrupt Fatal Python error: could not acquire lock for <_io.BufferedWriter name=''> at interpreter shutdown, possibly due to daemon threads

Thread 0x759c3470 (most recent call first): File "channel_read_example.py", line 30 in interruptInterpreter

Current thread 0x76fbb010 (most recent call first): Aborted

On Thu, Oct 11, 2018 at 11:29 AM Kyle Gabriel notifications@github.com wrote:

Actually, Could you also test the pyadda library as well. Execute the following commands:

~/Mycodo/env/bin/pip install RPi.GPIO cd ~ git clone github.com/jaxbulsara/pyadda cd pyadda ~/Mycodo/env/bin/python setup.py install

then try:

~/Mycodo/env/bin/python channel_read_example.py

and

sudo ~/Mycodo/env/bin/python channel_read_example.py

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/kizniche/Mycodo/issues/537#issuecomment-429069108, or mute the thread https://github.com/notifications/unsubscribe-auth/AVEVjYCNrtpW3YCujndtZPx5zEepEnWIks5uj44lgaJpZM4XBeMO .

SAM26K commented 5 years ago

This is the mycodo rev info (frorm clicking the rev at top left): Mycodo Version: 6.4.1 Python Version: 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516] Database Version: da10608dbc1c Daemon Status: Running Daemon Process ID: 1185 Daemon RAM Usage: 45.812 MB Daemon Virtualenv: Yes Frontend RAM Usage: 50.396 MB Frontend Virtualenv: Yes

On Fri, Oct 12, 2018 at 2:00 AM John Baxter jbbart03@gmail.com wrote:

After doing all of the above, activation of an ADS1256 device yields same error as before.

  • × Error: Could not activate Input controller with ID d4436c80-a68f-48de-8a64-e5d2b7cb8f1f: /home/pi/Mycodo/env/src/ads1256/ ads1256.cpython-35m-arm-linux-gnueabihf.so: undefined symbol: Py_InitModule3 Error: Could not activate Input controller with ID d4436c80-a68f-48de-8a64-e5d2b7cb8f1f: /home/pi/Mycodo/env/src/ads1256/ ads1256.cpython-35m-arm-linux-gnueabihf.so: undefined symbol: Py_InitModule3Error: Could not activate Input controller with ID d4436c80-a68f-48de-8a64-e5d2b7cb8f1f: /home/pi/Mycodo/env/src/ads1256/ ads1256.cpython-35m-arm-linux-gnueabihf.so: undefined symbol: Py_InitModule3

On Fri, Oct 12, 2018 at 1:29 AM John Baxter jbbart03@gmail.com wrote:

Here is result of pyadda steps. The last command line,

sudo ~/Mycodo/env/bin/python channel_read_example.py,

was working displaying the analog voltages in a fast loop. I had to hit ctrl c to copy the terminal text and that's when some errors or warnings appeared.

pi@raspberrypi3_2:~ $ git clone https://github.com/jaxbulsara/pyadda Cloning into 'pyadda'... remote: Enumerating objects: 38, done. remote: Total 38 (delta 0), reused 0 (delta 0), pack-reused 38 Unpacking objects: 100% (38/38), done. pi@raspberrypi3_2:~ $ cd pyadda pi@raspberrypi3_2:~/pyadda $ ~/Mycodo/env/bin/python setup.py install running install running build running build_ext building 'pyadda' extension creating build creating build/temp.linux-armv7l-3.5 arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-6waWnr/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -I/home/pi/Mycodo/env/include/python3.5m -c wrapper.c -o build/temp.linux-armv7l-3.5/wrapper.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-6waWnr/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -I/home/pi/Mycodo/env/include/python3.5m -c ADDAlibrary.c -o build/temp.linux-armv7l-3.5/ADDAlibrary.o creating build/lib.linux-armv7l-3.5 arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fdebug-prefix-map=/build/python3.5-6waWnr/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.5/wrapper.o build/temp.linux-armv7l-3.5/ADDAlibrary.o -lbcm2835 -o build/lib.linux-armv7l-3.5/pyadda.cpython-35m-arm-linux-gnueabihf.so running install_lib copying build/lib.linux-armv7l-3.5/ pyadda.cpython-35m-arm-linux-gnueabihf.so -> /home/pi/Mycodo/env/lib/python3.5/site-packages running install_egg_info Writing /home/pi/Mycodo/env/lib/python3.5/site-packages/UNKNOWN-0.0.0.egg-info pi@raspberrypi3_2:~/pyadda $

pi@raspberrypi3_2:~/pyadda $ ~/Mycodo/env/bin/python channel_read_example.py Segmentation fault pi@raspberrypi3_2:~/pyadda $

sudo ~/Mycodo/env/bin/python channel_read_example.py

ID= Ok, ASD1256 Chip ID = 0x3 Channel 0 - 1667.686mV Channel 1 - 1702.297mV ^CTraceback (most recent call last): Channel 2 - 1593.012mV File "channel_read_example.py", line 44, in Channel 3 - 1577.654mV Channel 4 - 1649.254mV pass7 - 1151.542mV KeyboardInterrupt Fatal Python error: could not acquire lock for <_io.BufferedWriter name=''> at interpreter shutdown, possibly due to daemon threads

Thread 0x759c3470 (most recent call first): File "channel_read_example.py", line 30 in interruptInterpreter

Current thread 0x76fbb010 (most recent call first): Aborted

On Thu, Oct 11, 2018 at 11:29 AM Kyle Gabriel notifications@github.com wrote:

Actually, Could you also test the pyadda library as well. Execute the following commands:

~/Mycodo/env/bin/pip install RPi.GPIO cd ~ git clone github.com/jaxbulsara/pyadda cd pyadda ~/Mycodo/env/bin/python setup.py install

then try:

~/Mycodo/env/bin/python channel_read_example.py

and

sudo ~/Mycodo/env/bin/python channel_read_example.py

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/kizniche/Mycodo/issues/537#issuecomment-429069108, or mute the thread https://github.com/notifications/unsubscribe-auth/AVEVjYCNrtpW3YCujndtZPx5zEepEnWIks5uj44lgaJpZM4XBeMO .

kizniche commented 5 years ago

After doing all of the above, activation of an ADS1256 device yields same error as before.

You're not going to see the Mycodo module work until we figure out what code works and I update the module.

working displaying the analog voltages in a fast loop

Good. The pyadda module works.

I'd like to ask if you could retry the PiPyADC module...

~/Mycodo/env/bin/pip install wiringpi
cd ~
git clone github.com/ul-gh/PiPyADC
cd PiPyADC

Then try:

~/Mycodo/env/bin/python ./example.py

and

~/Mycodo/env/bin/python ./example_2.py
SAM26K commented 5 years ago

First feed back : pi@raspberrypi3_2:~ $ git clone https://github.com/ul-gh/PiPyADC Cloning into 'PiPyADC'... remote: Enumerating objects: 15, done. remote: Counting objects: 100% (15/15), done. remote: Compressing objects: 100% (13/13), done. remote: Total 80 (delta 4), reused 9 (delta 2), pack-reused 65 Unpacking objects: 100% (80/80), done. pi@raspberrypi3_2:~ $ cd PiPyADC pi@raspberrypi3_2:~/PiPyADC $ ~/Mycodo/env/bin/python ./example.py

PiPyADC: Example file for class ADS1256 in module pipyadc:

ADS1256 cycling through eight input channels.

Hardware: Waveshare ADS1256 board interfaced to the Raspberry Pi 3

Ulrich Lukas 2017-03-10

Press CTRL-C to exit. Segmentation fault pi@raspberrypi3_2:~/PiPyADC $ sudo ~/Mycodo/env/bin/python ./example.py

PiPyADC: Example file for class ADS1256 in module pipyadc:

ADS1256 cycling through eight input channels.

Hardware: Waveshare ADS1256 board interfaced to the Raspberry Pi 3

Ulrich Lukas 2017-03-10

Press CTRL-C to exit. Segmentation fault

On Fri, Oct 12, 2018 at 6:27 AM Kyle Gabriel notifications@github.com wrote:

After doing all of the above, activation of an ADS1256 device yields same error as before.

You're not going to see the Mycodo module work until we figure out what code works and I update the module.

working displaying the analog voltages in a fast loop

Good. The pyadda module works.

I'd like to ask if you could retry the PiPyADC module...

~/Mycodo/env/bin/pip install wiringpi cd ~ git clone github.com/ul-gh/PiPyADC cd PiPyADC

Then try:

~/Mycodo/env/bin/python ./example.py

and

~/Mycodo/env/bin/python ./example_2.py

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/kizniche/Mycodo/issues/537#issuecomment-429325220, or mute the thread https://github.com/notifications/unsubscribe-auth/AVEVjdH4bANnI6eCj26SuM7yh3mqMMGyks5ukJifgaJpZM4XBeMO .

kizniche commented 5 years ago

Okay. It seems of the 3 libraries, only one works with python3. I'll integrate that one into Mycodo and let you know when you can upgrade to the master branch and test.

SAM26K commented 5 years ago

Excellent let me know when you want more testing.

On Fri, Oct 12, 2018 at 7:58 AM Kyle Gabriel notifications@github.com wrote:

Okay. It seems of the 3 libraries, only one works with python3. I'll integrate that one into Mycodo and let you know when you can upgrade to the master branch and test.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/kizniche/Mycodo/issues/537#issuecomment-429355112, or mute the thread https://github.com/notifications/unsubscribe-auth/AVEVjScF3z4A3eX2cUZ1XOhlGGKqgspWks5ukK4WgaJpZM4XBeMO .

kizniche commented 5 years ago

Quick question: when you tested the pyadda module, did you have a channel connected to a known voltage to test if the returned voltage was accurate? If not, could you connect a source (like a AA battery) and rerun the test script?