Coder Social home page Coder Social logo

Comments (3)

Gadgetoid avatar Gadgetoid commented on July 19, 2024

Looks like this is a very similar set of changes - https://github.com/pimoroni/phat-beat/pull/37/files

For stderr:

se = open("/dev/null", "ab+", 0)
os.dup2(se.fileno(), sys.stderr.fileno())

Works for me on Python 3.8

from hyperpixel.

pwr33 avatar pwr33 commented on July 19, 2024

Hi, been a while, just spent a bit more time on it, it is now failing on the line below
bus = smbus.SMBus(3)

does it need a udev rule or something?
there is no /dev/i2c-3

Tried compiling the overlays and that gave warnings, so I'm thinking its the same as with the hyperpixel4, stick with buster if you want the touch screen ???

====

File "/usr/bin/hyperpixel-touch", line 117, in
bus = smbus.SMBus(3)
FileNotFoundError: [Errno 2] No such file or directory
Exception ignored in: <function InputDevice.del at 0xb612ebb0>
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/evdev/device.py", line 160, in del
File "/usr/lib/python3/dist-packages/evdev/device.py", line 305, in close
File "/usr/lib/python3/dist-packages/evdev/eventio_async.py", line 55, in close
File "/usr/lib/python3.9/asyncio/events.py", line 725, in get_event_loop_policy
File "/usr/lib/python3.9/asyncio/events.py", line 718, in _init_event_loop_policy
ImportError: sys.meta_path is None, Python is likely shutting down

from hyperpixel.

pwr33 avatar pwr33 commented on July 19, 2024

OK, it is now SMBus(11) on buster and bullseye

And to stop a segfault, change

/usr/lib/systemd/system/triggerhappy.socket
[Socket]
remove ListenStream=/run/thd.socket
replace with ListenDatagram=/run/thd.socket

works for me anyway

from hyperpixel.

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.