ul-gh / PiPyADC

Python classes for interfacing Texas Instruments analog-to-digital converters with the Raspberry Pi
GNU Lesser General Public License v2.1
69 stars 27 forks source link

Segmentation fault on Raspberry pi 3 B+ #8

Closed adn05 closed 6 years ago

adn05 commented 6 years ago

Hi, firstly it is a good job you have done here. I'm trying to execute the example.py on a Raspberry Pi 3 B+, but I got a Segmentation fault. When I looked closer, I noticed that it is during the execution of _send_byte() that it fails. I don't know if you've ever seen this or if it is at wiringpi level the problem is.

ul-gh commented 6 years ago

Hi, yes, there is likely something wrong with your wiringpi installation. Or you have a permissions/access problem, normally the code must be run as root.

If wiringpi does not work for you, you can also use pigpio. This is the respective branch: https://github.com/ul-gh/PiPyADC/tree/pigpio

HTH, Ulrich

adn05 commented 6 years ago

Hi, the pigpio branch works fine for me. Thanks. I got a TypeError in delayMicroseconds method of WiringPi, that I solved by casting the delays to int. I'm using python 3.5. TypeError: in method 'delayMicroseconds', argument 1 of type 'unsigned int'

I will make a pull request for it. Narcisse

adn05 commented 6 years ago

Did you by any chance write something to pilot in python the DAC8552 which also appears on the High-Precision-AD-DA Board ?

ul-gh commented 6 years ago

Hi, thanks again for your error report, please see the latest commit regarding the type error. Regarding the onboard DAC, I am afraid, no, I did not do any work with it yet.