pieeg-club / PiEEG

Measure 8 EEG channels with Shield PiEEG and RaspberryPi
7 stars 1 forks source link

requirements.txt for the python version #1

Open vrescobar opened 2 months ago

vrescobar commented 2 months ago

I try to run on the newest raspberry pi 5 and following the instructions but I encoutnered a few issues

The first error I encounter is with gpiod path which is not found. When I corrected to the full qualified path chip = gpiod.Chip("/dev/gpiochip4") it will continue failing as the API seems to be different

$ python 1.8_ch_Pi5.py
Traceback (most recent call last):
  File "/home/vrescobar/projects/PiEEE-GUI/1.GUI/1.8_ch_Pi5.py", line 18, in <module>
    button_line = chip.get_line(button_pin)
                  ^^^^^^^^^^^^^
AttributeError: 'Chip' object has no attribute 'get_line'. Did you mean: 'get_info'?

Do you have a pip's requirements.txt to make sure the same versions are matched? here are my currently installed deps $ pip freeze

contourpy==1.2.1
cycler==0.12.1
fonttools==4.53.0
gpiod==2.2.0
kiwisolver==1.4.5
matplotlib==3.9.0
numpy==2.0.0
packaging==24.1
pillow==10.3.0
pyparsing==3.1.2
python-dateutil==2.9.0.post0
RPi.GPIO==0.7.1
scipy==1.14.0
six==1.16.0
spidev==3.6
Ildaron commented 2 months ago

Answered by email

Ildaron commented 3 weeks ago

Hi @vrescobar I added here also details for your version of gpiod is actually the next script

chip = gpiod.chip("/dev/gpiochip4")
line = chip.get_line(button_pin)
button_line = gpiod.line_request()

and While

while 1: button_state = line.get_value() if button_state == 1:
test_DRDY = 10
if test_DRDY == 10 and button_state == 0:
test_DRDY = 0