do pytrack-2 and pycoproc 0.0.4 work (wake on accel interrupt)



  • Hi gang,

    I've got a GPy and a pytrack v2, and I can't get them to wake on accelerometer interrupt. Does anyone have this working?

    I'm on GPY 1.20.2.r1, with a freshly-formatted littlefs filesystem and freshly-erased nvram. Libraries are from https://github.com/pycom/pycom-libraries/tree/master/pytrack-2/lib

    I'm trying

    from pytrack import Pytrack
    from LIS2HH12 import LIS2HH12
    
    py = Pytrack()
    acc = LIS2HH12(py)
    
    py.read_hw_version()          
    # 6
    py.read_fw_version()            
    # 15
    py.read_product_id()
    # 61459
    os.uname()     
    # (sysname='GPy', nodename='GPy', release='1.20.2.r1', version='v1.11-a5aa0b8 on 2020-09-09', machine='GPy with ESP32', pybytes='1.6.0')
    
    acc.enable_activity_interrupt(200, 200)     # this works before I go_to_sleep
    py.setup_int_wake_up(rising=True, falling=False)       # attempt to wake on activity
    
    py.setup_sleep(300)
    py.go_to_sleep()
    

    Once asleep, the pytrack button wakes it instantly, or RTC wakes it eventually, but no amount of shaking will cause the accelerometer to wake it. In related news, it seems pycoproc 0.0.4 has removed get_wake_reason() and get_sleep_remaining(). Does this library actually work?

    Thanks,
    Henry


  • Global Moderator

    Hi,
    We are working on fixing this issue!
    Gijs



  • @hgoldwire I am having a similar issue with my external interrupt using a sensor. I paid money for a 1 hour consultation with pycom and they stopped responding. Very unprofessional in my opinion.

    https://forum.pycom.io/topic/6370/pytrack2-external-pic-interrupt


Log in to reply
 

Pycom on Twitter