Skip to content

Commit

Permalink
Update example docs after switching to clapping event
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-robert committed Dec 13, 2024
1 parent 9f629a9 commit 8d21e61
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/ml_get_event_certainty.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The ML model runs several times a second and calculates a certainty value for ea

## Example

This example displays the ML model's certainty that the current action is `unknown` every second.
This example displays the ML model's certainty, in percent, that the current action is `clapping` every second.

```blocks
loops.everyInterval(1000, function () {
Expand Down
2 changes: 1 addition & 1 deletion docs/ml_is_event_detected.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Some programs will be easier to write using the “on ML start” and “on ML s

## Example

This example will show a tick icon on the LED display if the estimated action is `unknown` at the time the conditional statement is checked.
This example will show a tick icon on the LED display if the estimated action is `clapping` at the time the conditional statement is checked.

```blocks
basic.forever(function () {
Expand Down
2 changes: 1 addition & 1 deletion docs/ml_on_event_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The ML model updates its estimated action several times a second, but this event

## Example

This example uses the special `unknown` value and plays a musical melody in the background when no action has a certainty above the recognition point.
This example plays a musical melody in the background when the action `clapping` has a certainty above the recognition point.

```blocks
ml.onStart(ml.event.Clapping, function () {
Expand Down
2 changes: 1 addition & 1 deletion docs/ml_on_event_stop.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ For example, if your start event handler for an action starts music playing in t

## Example

This example uses the special `unknown` option and stops playing a musical melody when the estimated action changes to any other action.
This example stops playing a musical melody when the estimated action changes from `clapping` to any other action.

```blocks
ml.onStop(ml.event.Clapping, function () {
Expand Down
2 changes: 1 addition & 1 deletion docs/ml_on_event_stop_detailed.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The event handler is passed a `duration` parameter. The duration is the [number]

## Example

This example uses the special `unknown` option and shows the duration that `unknown` was the estimated action for in seconds when the estimated action changes to any other action.
This example shows on the LED display, in seconds, how long the estimated action was `clapping`, when the estimated action changes from `clapping` to any other action.

```blocks
ml.onStopDetailed(ml.event.Clapping, function (duration) {
Expand Down

0 comments on commit 8d21e61

Please sign in to comment.