Omega2 Dash ADC EXP (Python) not connecting.



  • @tjoseph1 @LightSwitch Not sure if Onion will update this libraries since the relay expansion is discontinued:

    https://onion.io/discontinuing-3-expansion-and-a-kit/



  • @crispyoz :

    Yes. The chances of supporting a "discontinued" h/w is almost nil.

    If we consider py2, py3 and micropython are 3 different streams of py the libs have to be made available in all three. Many developers are using python, all 3 variants of it. May be there is a reason Onion didn't release the libs that work with micropython ?

    It can still be ordered, say from mouser.com (sparkfun make)
    https://www.mouser.com/ProductDetail/SparkFun/DEV-14444?qs=wd5RIQLrsJgP0vNuuZBr2Q%3D%3D

    A "HOWTO" to build the micropython modules would be helpful and appreciated very much. People do not have to spend hours/days knitting pieces of information scattered all over the Internet into a working procedure-set. And the sad part is, it not sure if if is ever going to work, until we see it working...

    While running the time.sleep(10) py script, py3 takes 2MB straight, and micropython takes about 100kB+.

    root@Omega-745F:~# free
    total used free shared buffers cached
    Mem: 124808 56120 68688 92 15988 18588

    root@Omega-745F:~# python3 sleep.py &

    root@Omega-745F:~# free
    total used free shared buffers cached
    Mem: 124808 58172 66636 92 15988 18588

    root@Omega-745F:~# python3 sleep.py &

    root@Omega-745F:~# free
    total used free shared buffers cached
    Mem: 124808 60280 64528 92 15988 18588

    root@Omega-745F:~# ps
    1989 root 5512 S python3 sleep.py
    1991 root 5512 S python3 sleep.py

    root@Omega-745F:~# free
    total used free shared buffers cached
    Mem: 124808 56536 68272 92 15988 18952

    root@Omega-745F:~# micropython sleep.py &

    root@Omega-745F:~# free
    total used free shared buffers cached
    Mem: 124808 56660 68148 92 15988 18952

    root@Omega-745F:~# ps
    1995 root 2600 S micropython sleep.py

    Thanks..



  • @tjoseph1 Why not just call the c library functions directly.



  • @crispyoz :

    Why not just call the c library functions directly.

    From python3/micropython, how to do that ?

    Thanks..



  • @tjoseph1 There are some docs/discussions for calling musl libc using micropython, just google it. Another approach would be to write a micropython specific c function that calls libc functionality.

    Just another reason to dislike python šŸ™‚



  • @crispyoz :

    Thanks ..
    The solutions I found were using ffilib, ctypes or mpy.
    mpy is not implemented in 1.9.2 ?
    >>> import sys
    >>> sys.implementation
    (name='micropython', version=(1, 9, 2))

    but could find it 1.13.0, the latest.
    >>> import sys
    >>> sys.implementation
    (name='micropython', version=(1, 13, 0), mpy=9733)

    Don't you think, those are much of an overhead for py programmer ?
    The approaches are different.
    py programmer: how do I get this done?
    c programmer: how do I get the system to do this?

    Just another reason to dislike python people who do not tell other py programmers-that python is NOT for everything šŸ™‚



  • @tjoseph1 yes a 4GL in fancy clothing šŸ™‚



  • @crispyoz :
    May be they (the py lib people - they must be hardcore c programmers as well) are constrained, and are going by the 80/20 rule.. 80% of the time, the implemented 20% feature works..

    Agian, on a non-constrained platform python works well.. to make all happy.



  • @tjoseph1 You don't want to start me on this šŸ™‚



  • @crispyoz :
    I am here to listen.. and I am sure that it will broaden my outlook..
    As an eg., you got me search that gave me 3 options today..

    I genaralize, based on what I know..

    So, please..go ahead šŸ™‚


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.