{"action":"created","issue":{"url":"https://api.github.com/repos/kizniche/Mycodo/issues/537","repository_url":"https://api.github.com/repos/kizniche/Mycodo","labels_url":"https://api.github.com/repos/kizniche/Mycodo/issues/537/labels{/name}","comments_url":"https://api.github.com/repos/kizniche/Mycodo/issues/537/comments","events_url":"https://api.github.com/repos/kizniche/Mycodo/issues/537/events","html_url":"https://github.com/kizniche/Mycodo/issues/537","id":365329217,"node_id":"MDU6SXNzdWUzNjUzMjkyMTc=","number":537,"title":"ADS1256 ADC Input addition","user":{"login":"SAM26K","id":22091149,"node_id":"MDQ6VXNlcjIyMDkxMTQ5","avatar_url":"https://avatars0.githubusercontent.com/u/22091149?v=4","gravatar_id":"","url":"https://api.github.com/users/SAM26K","html_url":"https://github.com/SAM26K","followers_url":"https://api.github.com/users/SAM26K/followers","following_url":"https://api.github.com/users/SAM26K/following{/other_user}","gists_url":"https://api.github.com/users/SAM26K/gists{/gist_id}","starred_url":"https://api.github.com/users/SAM26K/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SAM26K/subscriptions","organizations_url":"https://api.github.com/users/SAM26K/orgs","repos_url":"https://api.github.com/users/SAM26K/repos","events_url":"https://api.github.com/users/SAM26K/events{/privacy}","received_events_url":"https://api.github.com/users/SAM26K/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":122,"created_at":"2018-10-01T06:50:51Z","updated_at":"2018-10-17T04:17:09Z","closed_at":null,"author_association":"NONE","body":"## Mycodo Issue Report:\r\n  - Specific Mycodo Version: 6.39\r\n \r\n#### Problem Description\r\nPlease list:\r\n  - Using waveshare ADS1256 8 ch A/D converter to monitor analog soil moisture sensors.\r\n     Since this pcb is not on the sensor list, I'm using some python code (called by some Linux bash code) to return the selected channels voltage.  This is the bash code:\n\n```bash\r\n    sudo /etc/getch0.sh\r\n    Above command calls the following command:\r\n    sudo python ~/Desktop/ads1256code1/py-ads1256/read_volts_ch0.py\r\n\r\n   read_volts_ch0.py contains the following python code:\r\n   import ads1256       # import this lib                             \r\n\r\ngain = 1\t\t\t # ADC's Gain parameter\r\nsps = 25\t\t\t # ADC's SPS parameter\r\n\r\n# Create the first list. It will receive ADC's absolute values\r\nAllChannelValuesVolts = [0,0,0,0,0,0,0,0]       \r\n\r\n# Create the second list. It will received absolute values converted to Volts\r\nAllChannelValues = [0,0,0,0,0,0,0,0]\t\t\r\n\r\n# Initialize the ADC using the parameters\r\nads1256.start(str(gain),str(sps))  \r\n#Fill the first list with all the ADC's absolute channel values\r\nAllChannelValues = ads1256.read_all_channels()        \r\n for i in range(0, 8):\r\n\t# Fill the second list  with the voltage values\r\n\tAllChannelValuesVolts[i] = (((AllChannelValues[i] * 100) /167.0)/int(gain))/1000000.0   \r\n#for i in range(0, 8):     \r\n#    # Print all the absolute values\r\n#    print AllChannelValues[i]              \r\n# Print a new line\r\n#print (\"\\n\");\t\t\t\t\t\t\t   \r\n#for i in range(0, 8):     \r\n    # Print all the Volts values converted from the absolute values\r\n#    print AllChannelValuesVolts[i]\r\n print AllChannelValuesVolts[0]\r\n# Stop the use of the ADC\r\nads1256.stop() \t\r\n```\n\r\n  - what were you trying to do\r\n  - specific setup details that are involved\r\n \r\n### Errors\r\n  - List any errors you encountered.\r\n  - Copy and pasting crash logs, or link to any specific\r\ncode lines you've isolated (please use GitHub permalinks for this)\r\n\r\n\r\n### Steps to Reproduce the issue:\r\nHow can this issue be reproduced?\r\n 1. step 1\r\n 2. step 2...\r\n 3. etc\r\n \r\n### Additional Notes\r\nIs there anything that should be added to make it easier\r\nto address this issue?"},"comment":{"url":"https://api.github.com/repos/kizniche/Mycodo/issues/comments/430484035","html_url":"https://github.com/kizniche/Mycodo/issues/537#issuecomment-430484035","issue_url":"https://api.github.com/repos/kizniche/Mycodo/issues/537","id":430484035,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDQ4NDAzNQ==","user":{"login":"SAM26K","id":22091149,"node_id":"MDQ6VXNlcjIyMDkxMTQ5","avatar_url":"https://avatars0.githubusercontent.com/u/22091149?v=4","gravatar_id":"","url":"https://api.github.com/users/SAM26K","html_url":"https://github.com/SAM26K","followers_url":"https://api.github.com/users/SAM26K/followers","following_url":"https://api.github.com/users/SAM26K/following{/other_user}","gists_url":"https://api.github.com/users/SAM26K/gists{/gist_id}","starred_url":"https://api.github.com/users/SAM26K/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SAM26K/subscriptions","organizations_url":"https://api.github.com/users/SAM26K/orgs","repos_url":"https://api.github.com/users/SAM26K/repos","events_url":"https://api.github.com/users/SAM26K/events{/privacy}","received_events_url":"https://api.github.com/users/SAM26K/received_events","type":"User","site_admin":false},"created_at":"2018-10-17T04:17:09Z","updated_at":"2018-10-17T04:17:09Z","author_association":"NONE","body":"I checked it when I built everything using the example code in the folder\n~/Desktop/ADS1256 from Waveshare. The program ads1256_test runs in a loop\nand displays all 8 channels with 6 decimal  places.  Those voltages are\nvery accurate but I think its a different way of accessing the data as the\nsingle channel method.\n\nOn Tue, Oct 16, 2018 at 9:10 PM Kyle Gabriel <notifications@github.com>\nwrote:\n\n> Also, switching the leads from a channel you think isn't operating\n> properly with one that is should give you insight.\n>\n> —\n> You are receiving this because you modified the open/close state.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/kizniche/Mycodo/issues/537#issuecomment-430483100>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AVEVjdBnB0BY87sC90EzwjpHXOoRlg5aks5ulq25gaJpZM4XBeMO>\n> .\n>\n"}}
{"actor":{"display_login":"SAM26K"}}