xtacocorex / CHIP_IO

A CHIP IO library for Python: IO+PWM+SPWM+ADC+Utilities
MIT License
272 stars 60 forks source link

Segmentation fault #83

Open dpengftw opened 6 years ago

dpengftw commented 6 years ago

I'm running fairly simple code and I am getting seg. fault with sending values out.

GPIO.setup("XIO-P1", GPIO.OUT) ** gpio_set_direction: out ** ** open_value_file ** ** gpio_allowed: found match ** is_this_chippro: total system ram: 491.0 mb ** is_this_chippro: we are a chip ** gpio_allowed: pin allowed for chip or both and we're a chip ** gpio_allowed: found match ** is_this_chippro: total system ram: 491.0 mb ** is_this_chippro: we are a chip ** gpio_allowed: pin allowed for chip or both and we're a chip Segmentation fault

GPIO.setup("XIO-P1", GPIO.OUT) time.sleep(1) GPIO.output("XIO-P1", GPIO.LOW) GPIO.cleanup()

Here is my CHIP kernel version: chip@chip:~/chipflaskgarage-master$ uname -a Linux chip 4.4.13-ntc-mlc #1 SMP Tue Dec 6 21:38:00 UTC 2016 armv7l GNU/Linux

ii python-chip-io 0.7.1-1 armhf A module to control CHIP IO channels

rysi3k commented 5 years ago

I have same problem. When I try to set port value as non-root user is fails with seg fault. On root works great.

xtacocorex commented 5 years ago

This library has to be run as root.