Skip to content

Conversation

@microbit-mark
Copy link
Contributor

@microbit-mark microbit-mark commented Aug 25, 2021

  • Update README

@microbit-mark
Copy link
Contributor Author

@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.
Copy link
Collaborator

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.

Copy link
Contributor Author

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()
})
```
Copy link
Collaborator

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.

Copy link
Contributor Author

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 ![Build status badge](https://github.com/microbit-foundation/pxt-power/workflows/MakeCode/badge.svg)
### Edit this project ![Build status badge](https://github.com/microbit-foundation/pxt-power/workflows/MakeCode/badge.svg)
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

@martinwork
Copy link
Collaborator

@microbit-mark Shall we merge this as-is to see how it looks?

@microbit-mark microbit-mark merged commit 98064b4 into master Aug 26, 2021
@microbit-mark microbit-mark deleted the first-docs branch August 26, 2021 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants