Code Monkey home page Code Monkey logo

apigpio's Issues

Serial Access including RS232 (Feature request)

Hello @PierreRust,

Many thanks for your work. Please is it possible to kindly add support for the Serial interface? I went via the doc on the pigpio library, and it seems to support serial.

I have a serial interface at “/dev/ttyAMA0”, and was hoping to be able to access it asynchronously using your code. Also support for RS485 will be great as mine is on “/dev/ttyRS485”.

Thanks and regards

Installing from PyPI fails

# pip install apigpio
Collecting apigpio
  Downloading apigpio-0.0.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-lrcpnl9o/apigpio/setup.py", line 4, in <module>
        with open('README.md', 'r') as f:
    FileNotFoundError: [Errno 2] No such file or directory: 'README.md'

You should add a MANIFEST.in to be sure the file README.md is included in the package.

Note that PyPI doesn't render markdown. You might want to use a README.rst instead. There are some workarounds with pandoc otherwise: https://stackoverflow.com/questions/26737222/pypi-description-markdown-doesnt-work

Cleanup for callbacks

I need to add some cleanups for callbacks registration.
Maybe implement a context manager to handle all cleanup operations.

Failing to use / import apigpio

From missionpinball/mpf#1427

File "/usr/local/lib/python3.7/dist-packages/mpf/core/machine.py", line 212, in initialise
    yield from self.initialise_core_and_hardware()
  File "/usr/local/lib/python3.7/dist-packages/mpf/core/machine.py", line 197, in initialise_core_and_hardware
    self._load_hardware_platforms()
  File "/usr/local/lib/python3.7/dist-packages/mpf/core/machine.py", line 497, in _load_hardware_platforms
    self.add_platform(hardware_platform)
  File "/usr/local/lib/python3.7/dist-packages/mpf/core/machine.py", line 614, in add_platform
    hardware_platform = Util.string_to_class(self.config['mpf']['platforms'][name])
  File "/usr/local/lib/python3.7/dist-packages/mpf/core/utility_functions.py", line 588, in string_to_class
    m = __import__(module)
  File "/usr/local/lib/python3.7/dist-packages/mpf/platforms/rpi/rpi.py", line 20, in <module>
    import apigpio
  File "/usr/local/lib/python3.7/dist-packages/apigpio/__init__.py", line 2, in <module>
    from .apigpio import Pi

I then go on to try to import apigpio from python2 and python3 and get :

pi@pizerow:~/mpf $ python3
Python 3.7.3 (default, Apr  3 2019, 05:39:12) 
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import apigpio
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/dist-packages/apigpio/__init__.py", line 2, in <module>
    from .apigpio import Pi
  File "/usr/local/lib/python3.7/dist-packages/apigpio/apigpio.py", line 390
    asyncio.async(self._wait_for_notif())
                ^
SyntaxError: invalid syntax
>>> 
pi@pizerow:~/mpf $ python
Python 2.7.16 (default, Apr  6 2019, 01:42:57) 
[GCC 8.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import apigpio
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/apigpio/__init__.py", line 2, in <module>
    from .apigpio import Pi
  File "/usr/local/lib/python2.7/dist-packages/apigpio/apigpio.py", line 388
    yield from self._loop.sock_connect(self.s, address)
             ^
SyntaxError: invalid syntax
>>> 

Seeing from .apigpio import Pi I was looking for a Pi.py in /usr/local/lib/python3.7/dist-packages/apigpio/ but couldn't fit it :

ls /usr/local/lib/python3.7/dist-packages/apigpio/
__init__.py  __pycache__  apigpio.py  ctes.py  utils.py
ls /usr/local/lib/python2.7/dist-packages/apigpio/
__init__.py  __init__.pyc  apigpio.py  ctes.py  ctes.pyc  utils.py  utils.pyc

Upload to pypi

We would like up use apigpio in https://github.com/missionpinball/mpf/ which heavily relies on asyncio to support the RPi as some kind of port extender. However, we need a convenient way for our users to install it. Can you upload it to pypi? We only need python 3+ (currently 3.4 to 3.6).

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.