Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3 Segmentation Fault with Rotary Encoder #33

Open
OliverMardle opened this issue Aug 23, 2017 · 2 comments
Open

Python3 Segmentation Fault with Rotary Encoder #33

OliverMardle opened this issue Aug 23, 2017 · 2 comments

Comments

@OliverMardle
Copy link

Hi, I just tried to run the example program for the rotary encoder provided and as soon as I turn the rotary encoder the program terminates and gives the "Segmentation Fault" error.

Cheers.

@guyc
Copy link
Owner

guyc commented Aug 23, 2017

There are three samples for the rotary encoder. Which one gives you an error?

  1. https://github.com/guyc/py-gaugette/blob/master/samples/rotary_test.py
  2. https://github.com/guyc/py-gaugette/blob/master/samples/rotary_worker_test.py
  3. https://github.com/guyc/py-gaugette/blob/master/samples/rotary_interrupt_test.py

My money is on (3). Do the others give the same result?

It would be good to know some more details.

  • what board you are using
  • what OS you are using
  • output from python --version
  • output from pip show wiringpi

@OliverMardle
Copy link
Author

OliverMardle commented Aug 24, 2017

Hi, Sorry for the complete lack of information I provided... Your absolutely right, the issue occurs only on rotary_interrupt_test.py. The switch works but as soon as I turn the dial I get the error.
I'm using a Raspberry Pi 2 at the moment and the latest distribution of Raspbian Stretch. In terms of python I'm using Python 3 and the output of python3 --version is Python 3.5.3
The output of sudo pip3 show wiringpi is:

Name: wiringpi
Version: 2.44.4
Summary: UNKNOWN
Home-page: UNKNOWN
Author: UNKNOWN
Author-email: UNKNOWN
License: UNKNOWN
Location: /usr/local/lib/python3.5/dist-packages
Requires:

When I do run the other working programs the rotary encoder appears to be a bit jumpy, I think this must be the stage of the encoder however this can be resolved at a later stage.

Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants