Git Product home page Git Product logo

Comments (8)

matthub avatar matthub commented on July 19, 2024 8

For me the hint from joppep at https://www.raspberrypi.org/forums/viewtopic.php?t=170606 solved the issue, copying here for reference:

Within spi.py (at my system it was at /usr/local/lib/python3.5/dist-packages/pifacecommon/spi.py) add a line speed_hz=ctypes.c_uint32(100000) to the transfer struct so that it looks as following

 # create the spi transfer struct
        transfer = spi_ioc_transfer(
            tx_buf=ctypes.addressof(wbuffer),
            rx_buf=ctypes.addressof(rbuffer),
            len=ctypes.sizeof(wbuffer),
            speed_hz=ctypes.c_uint32(100000) 
        )

from pifacecommon.

jmbillings avatar jmbillings commented on July 19, 2024

Incidentally, this: https://github.com/bulletmark/pifaceio does work- I can perform a 'write' and hear the relay click and an LED illuminates, so I guess the board is physically okay.

from pifacecommon.

johnfrancisgit avatar johnfrancisgit commented on July 19, 2024

@matthub Thanks! I'm using the pifacerelayplus board and it wasn't being detected. Using your fix it works!

from pifacecommon.

feanor12 avatar feanor12 commented on July 19, 2024

Is this fixed?

from pifacecommon.

jmbillings avatar jmbillings commented on July 19, 2024

Board appears working now, so yep, happy to close this.

from pifacecommon.

jwarnier avatar jwarnier commented on July 19, 2024

I got the same issue on a Pi 1 model B+, and the suggested fix does not work.

I guess it probably has a different max speed?
I tried (pure guess) already the following values, without success: 100000, 1000000, 150000, 15000
How do I know the actual value to use?

Thanks

from pifacecommon.

oh4va avatar oh4va commented on July 19, 2024

I got a LED blinking on a Pi1 B using next commands:
git clone [email protected]:piface/pifacedigitalio.git
git clone https://github.com/piface/pifacecommon.git
cd pifacecommon/
sudo python setup.py install
cd ../pifacedigitalio/examples/
sudo python blink.py

I hope this helps

from pifacecommon.

jwarnier avatar jwarnier commented on July 19, 2024

Any chance this issue is fixed thanks to #23 ?

from pifacecommon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.