Guzunty / Pi

This repository contains resources to support the Guzunty Pi IO expansion board
110 stars 32 forks source link

Message: ERROR while sending #24

Closed kworsfold closed 10 years ago

kworsfold commented 10 years ago

Having built and programmed Core for 16o8i successfully, when I run the C++ file I am getting a message: "ERROR while sending" repeated several times

Also tried Python script and get output: pi ~/Guzunty/Pi/src/gz_16o8i $ sudo python gz_16o8i.py Traceback (most recent call last): File "gz_16o8i.py", line 32, in import GZ ImportError: No module named GZ

Any ideas, I am thinking library not installed correctly somewhere

campbellsan commented 10 years ago

Yes, it would seem at least some of the setup steps did not complete successfully.

I can infer from what you have told me that you performed the steps on the 'Get your Pi set up' page, but did you notice any error messages while you were doing those steps?

"ERROR while sending" is reported by the serial peripheral interface (SPI) driver. Please try the following command:

ls /dev/spi*

You should get the output: /dev/spidev0.0 /dev/spidev0.1

If you don't get this, check that the SPI device has been removed from the blacklist as described on the 'Get your Pi set up' page.

Installing the Python library is not yet included in the setup pages, but since it uses the C based library which is currently not working for you, there is no point in installing the Python support just yet. I'll help with that once we get you up and running with SPI.

kworsfold commented 10 years ago

Have completed configuration twice and not noticed any errors

Tried your command and replies ls: cannot access /dev/spi*: No such file or directory

Black list has # in front of it

kworsfold commented 10 years ago

Problem solved..... did not place # in Blacklist correctly Thanks for your help, knew it was going to be something simple

campbellsan commented 10 years ago

Awesome!

To install the python support, you give the command:

sudo python setup.py install

in the Pi/src/gzlib/src folder.

Please let me know how that works for you.

kworsfold commented 10 years ago

Ran the command as advised and got this error

pi ~/Guzunty/Pi/src/gzlib/src $ sudo python setup.py install running install running build running build_ext building 'GZ' extension creating build creating build/temp.linux-armv6l-2.7 gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototy pes -fPIC -I/usr/include/python2.7 -c gz_libpy.c -o build/temp.linux-armv6l-2.7/ gz_libpy.o gz_libpy.c:27:20: fatal error: Python.h: No such file or directory compilation terminated. error: command 'gcc' failed with exit status 1 pi ~/Guzunty/Pi/src/gzlib/src $

Question: Should 'Guzunty' folder end up as 'home/pi/Guzunty' 0r 'home/pi/bcm2835-1.17/Guzunty'

campbellsan commented 10 years ago

I can't answer your last question definitively because I don't know what you did during the set up process. I am guessing that you have cloned the git repository twice in two different places. I would use the first one and delete the second to avoid confusion (if you did any work in there you might want to back it up first of course).

Happily, I can help with the build error. It looks like you need to be set up with python development support, in which case:

sudo apt-get install python-dev

will do the trick.

kworsfold commented 10 years ago

I guess it is not critical which one is used

campbellsan commented 10 years ago

No, it's not critical, but having your folder of Guzunty specific work under a folder for the generic library that supports the Raspberry Pi SOC is a little funky.

If I didn't know where to look, I wouldn't start looking in there :-) That was the only reason I suggested using the one in the root of your home directory where it will be easy to find, It is absolutely your choice though.

kworsfold commented 10 years ago

All working perfectly now... Again thanks for your help.

campbellsan commented 10 years ago

My pleasure. I have updated the Set up your Pi page to add the steps to get the Python module installed. So I'll go ahead and close this issue. Enjoy your Guzunty! :-)

kworsfold commented 10 years ago

Excellent... Glad to see something positive came out of it.