Skip to content
This repository was archived by the owner on Sep 10, 2024. It is now read-only.
This repository was archived by the owner on Sep 10, 2024. It is now read-only.

DeepSleep library example do not work #26

Open
@txinto

Description

@txinto

Hello, I've tried to execute the example of DeepSleep.

I followed this guide, trying to figure the obscure steps:
https://docs.pycom.io/chapter/datasheets/boards/deepsleep/api.html

First, I added this example as a project in Atom:
https://github.com/pycom/pycom-libraries/tree/master/examples/deepsleep
So, I have a single main.py on my project.

Then I've copied the deepsleep.py file to the the ./lib/deepsleep/deepsleep.py path in my project.
The file I've copied is this: https://github.com/pycom/pycom-libraries/blob/master/deepsleep/deepsleep.py
Now I have two files
./main.py
./lib
./lib/deepsleep/deepsleep.py

Then I sync the project with my SiPy using the Atom Pimakr plugin and after the reset I see this:

Traceback...
File "", line 3, in
TypeError: 'module' object is not callable

I've tried to change
ds = DeepSleep()
to
ds = DeepSleep.DeepSleep()

and then

Traceback (most recent call last):
File "main.py", line 6, in
File "/flash/lib/deepsleep/DeepSleep.py", line 145, in get_wake_status
File "/flash/lib/deepsleep/DeepSleep.py", line 76, in peek
IndexError: bytes index out of range

Thanks for fixing the documentation and/or example and/or library.

Best regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions