Skip to content
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

Upgrade to v7 #303

Merged
merged 21 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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
Loading