py-ads1256
py-ads1256 copied to clipboard
Segmentation fault
Hi great work here again.. Running those tests, is giving me segmentation fault
This line to be particular:
ads1256.start(str(1),"25")
UPDATE: I apologize the error was not descriptive or indicative. The problem was solved when running with sudo
. But can you explain what does # initialize the ADC using 25 SPS with GAIN of 1x
mean?
Hi renderit,
About the segmentation fault, there're some systems that really needs the sudo access to be able to initialize it. About the line after the "#" character: all the comments on Python are preceded of a # character, so it's just there for informative purpose.
The line:
ads1256.start(str(1),"25")
Just tells the Waveshare ADC to initialize it before the readings with a gain of 1x, and the SPS of 25.
-- Fábio
but can you fix the segmentation fault?