-
Notifications
You must be signed in to change notification settings - Fork 4
Update readme to add some basic documentation #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@martinwork Not certain this will render properly in MakeCode, but we'll need some basic documentation for each API before we open source it here. Could you review and suggest any corrections/additions? |
README.md
Outdated
|
|
||
| You can also ask the micro:bit to enter a ``||power.deepSleep||`` where it will pause until a wake up event occurs and power down at the next opportunity. | ||
|
|
||
| Sometimes we might want to delay a request for sleep, such as TODO. The ``||power.deepSleepPause(ms)||`` block will ask the micro:bit to delay the sleep operation for a set interval in milliseconds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The request for sleep is not delayed. I think of this as equivalent to basic.pause(ms) but conserving power. It's like power.deepSleep with a timer to ensure micro:bit wakes up in time for the end of the pause.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in fa33bf8
| basic.forever(function () { | ||
| power.powerDownRequest() | ||
| }) | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd leave out the second forever for this snippet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in fa33bf8
README.md
Outdated
| * search for **https://github.com/microbit-foundation/pxt-power** and import | ||
|
|
||
| ## Edit this project  | ||
| ### Edit this project  |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this section about editing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the whole section about editing and adding in fa33bf8. We can add a CONTRIBUTING.MD to the repo if we want to later invite other developers to edit the extension, but I think this is not required for now.
|
@microbit-mark Shall we merge this as-is to see how it looks? |
Uh oh!
There was an error while loading. Please reload this page.