Skip to content

Commit

Permalink
Upgrade to v7 (#303)
Browse files Browse the repository at this point in the history
* cherrypick from mb6.1.7 to mb7.0.12

* cherrypick from mb7.0.12 to mb7.0.20

* replace ButtonPressed with ButtonEvent

* fix doc example scripts

* add all pins for servos

Change pin clasifications to "PWM" and "PWMOnly", where PWMOnly are pins without Analog Write.

* bump version to 7.x.x

* use codal-microbit  v0.2.67-calliope-rc1

* update board names to Calliope mini

* update enums, shims and lockfile

* fix cherrypicked changes for v7 update

* add orglogowide and fix workbook courses

* fix tests

* Upstream mb7.0.21

* remove unused courses

* revert changes not suitable for calliope target

* Merge MicroBit 7.0.22

* Merge mb 7.0.25

* remove unreferenced images and docs files

* remove extension gallery

* Merge mb v7.0.26

include calliope pin definitions

* add test.blocks
  • Loading branch information
Amerlander authored Aug 28, 2024
1 parent f1ed402 commit 29c3075
Show file tree
Hide file tree
Showing 720 changed files with 6,926 additions and 7,886 deletions.
2 changes: 1 addition & 1 deletion docs/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ input.onButtonEvent(Button.B, input.buttonEventValue(ButtonEvent.Down), () => {

## Learn!

We have tons of [projects](/projects), [examples](/examples) and [courses](/courses) to get your started!
We have tons of [projects](/projects) and [examples](/examples) to get your started!

## C++ Runtime

Expand Down
6 changes: 3 additions & 3 deletions docs/calliope/arbeitsheft/23-4_fitness.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 23 4_Fitness

```ghost
let Tempo = 1000
let tempo = 1000
basic.setLedColor(0xff0000)
basic.pause(tempo)
for (let index = 0; index < 2; index++) {
Expand Down Expand Up @@ -37,8 +37,8 @@ Complete your program.
## Use variables @showdialog
Use a variable to define the speed of your animation and adjust it easily.

## Create variable Tempo
Create a ``||variables.variable||`` and name it "Tempo".
## Create variable tempo
Create a ``||variables.variable||`` and name it "tempo".

```
```
Expand Down
11 changes: 6 additions & 5 deletions docs/calliope/arbeitsheft/33-4_licht.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
# 33 4 Light

```ghost
let brightness = input.lightLevel();
input.onButtonEvent(Button.B, input.buttonEventClick(), function () {
basic.showNumber(Licht)
basic.showNumber(brightness)
})
```

## Task @showdialog
Write a program that saves the measured light value in a variable when the LED matrix is switched off and then display the saved value on the LED matrix.

## Create variable
Create a ``||variables.variable||`` and name it "Light".
Create a ``||variables.variable||`` and name it "brightness".

```
```
![](https://calliope.cc/tutorials/variable_licht.png)

## Save light intensity @showdialog
If button A is clicked, save the measured light intensity in the variable "Light".
If button A is clicked, save the measured light intensity in the variable "brightness".

## Define input
Select the block ``||input.on button A is clicked|||`` as input.
Expand All @@ -28,15 +29,15 @@ Use the ``||variables.set light to||`` block to set the value of the variable to


## Show light intensity @showdialog
When button B is clicked, show the value of the variable "Light".
When button B is clicked, show the value of the variable "brightness".

## Define input
Place another block ``|| input.on button A ||`` clicked and change it to ``|| input.on button B ||`` clicked.

![Button B](https://calliope.cc/tutorials/kopf_a_b.png)

## Define output
Use the ``|| basic.show number||`` block and display the value of the variable``||variables.light||``.
Use the ``|| basic.show number||`` block and display the value of the variable``||variables.brightness||``.


## Done! 👏
Expand Down
21 changes: 11 additions & 10 deletions docs/calliope/arbeitsheft/42-2_orakel.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# 42 2 Oracle

```ghost
let Zufall = 0
let zufall = 0
input.onGesture(Gesture.Shake, function () {
Zufall = randint(0, 2)
if (Zufall == 1) {
basic.showString("Ja")
}
if (Zufall == 2) {
basic.showString("Nein")
}
if (Zufall == 3) {
basic.showString("Vielleicht")
zufall = randint(0, 2)
if (zufall == 1) {
basic.showString("Ja")
}
if (zufall == 2) {
basic.showString("Nein")
}
if (zufall == 3) {
basic.showString("Vielleicht")
}
}
```

Expand Down
8 changes: 4 additions & 4 deletions docs/calliope/arbeitsheft/49-1_schaetzspiel.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# 49 1 Estimation game

```ghost
let Entfernung = 0
let distance = 0
input.onButtonEvent(Button.A, input.buttonEventValue(ButtonEvent.Click), function () {
Entfernung = Math.round(grove.measureInCentimeters(DigitalPin.C16))
distance = Math.round(grove.measureInCentimeters(DigitalPin.C16))
})
input.onButtonEvent(Button.B, input.buttonEventValue(ButtonEvent.Click), function () {
basic.showNumber(Entfernung)
basic.showNumber(distance)
})
basic.forever(function () {
basic.showLeds(`
Expand All @@ -32,7 +32,7 @@ Press button A to measure the distance and save it in a variable. Press button B
Insert the block ``||input.on button A is clicked||`` twice and change the button to ``B`` for one block. Tip: You can duplicate the block by right-clicking.

## Define variable
To save the distance when the button is pressed and retrieve it later, create a ``||variable.variable||`` and name it *Distance*.
To save the distance when the button is pressed and retrieve it later, create a ``||variable.variable||`` and name it *distance*.


```
Expand Down
2 changes: 1 addition & 1 deletion docs/calliope/arbeitsheft/50-2_personenzaehler.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ Click on ``|Download|`` to transfer your program to your Calliope mini and test

```package
grove=github:calliope-edu/pxt-grove
```
17 changes: 0 additions & 17 deletions docs/calliope/examples.md

This file was deleted.

60 changes: 0 additions & 60 deletions docs/calliope/videos.md

This file was deleted.

74 changes: 0 additions & 74 deletions docs/coding-cards.md

This file was deleted.

Loading

0 comments on commit 29c3075

Please sign in to comment.