Skip to content

Commit

Permalink
fix tutorials & ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Amerlander committed Oct 11, 2024
1 parent 0f47c4e commit 2d585b3
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 252 deletions.
2 changes: 1 addition & 1 deletion docs/calliope/arbeitsheft/42-2_orakel.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ input.onGesture(Gesture.Shake, function () {
if (zufall == 3) {
basic.showString("Vielleicht")
}
}
});
```

## Task @showdialog
Expand Down
8 changes: 5 additions & 3 deletions docs/calliope/arbeitsheft/49-1_schaetzspiel.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ basic.forever(function () {
})
```

```package
grove=github:calliope-edu/pxt-grove
```

## Estimation game @showdialog
Programme an estimation game that measures the distance between two objects. The
Calliope mini measures the distance - in secret. You estimate the distance and the Calliope mini solves and displays the measured distance.
Expand Down Expand Up @@ -58,9 +62,7 @@ Finally, let a ‘?’ appear permanently on the LED matrix. Draw a ? with the b
## Done! 👏
Click on ``|Download|``, test your programme on the Calliope mini and try to estimate the distance correctly!

```package
grove=github:calliope-edu/pxt-grove
```




Expand Down
9 changes: 5 additions & 4 deletions docs/calliope/arbeitsheft/50-2_personenzaehler.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ basic.forever(function () {
})
```

```package
grove=github:calliope-edu/pxt-grove
```


## Task @showdialog
Is the class complete?
Use the ultrasonic sensor to check whether all the children are back in the classroom. Program a people counter to count the number of people entering the classroom.
Expand Down Expand Up @@ -66,7 +71,3 @@ Tip: Use the variable ``||variables.peoplecounter|||``

## That's it! ✨
Click on ``|Download|`` to transfer your program to your Calliope mini and test the people counter.

```package
grove=github:calliope-edu/pxt-grove
```
124 changes: 2 additions & 122 deletions libs/core/blocks-test/pins.blocks
Original file line number Diff line number Diff line change
@@ -1,127 +1,7 @@
<xml xmlns="https://developers.google.com/blockly/xml"
><variables></variables
><block type="pins_on_pulsed" x="0" y="0"
><field name="pulse">PulseValue.Low</field
><value name="pin"
><shadow type="digital_pin"
><field name="pin">DigitalPin.P5</field></shadow
></value
><statement name="HANDLER"
><block type="device_set_analog_pin"
><value name="name"
><shadow type="analog_pin"
><field name="pin">AnalogPin.P9</field></shadow
></value
><value name="value"
><shadow type="math_number"
><field name="NUM">5</field></shadow
></value
><next
><block type="device_set_analog_period"
><value name="pin"
><shadow type="analog_pin"
><field name="pin">AnalogPin.P10</field></shadow
></value
><value name="micros"
><shadow type="math_number"
><field name="NUM">20000</field></shadow
></value
><next
><block type="device_set_digital_pin"
><value name="name"
><shadow type="digital_pin"
><field name="pin">DigitalPin.P6</field></shadow
></value
><value name="value"
><shadow type="math_number"
><field name="NUM">5</field></shadow
></value
><next
><block type="device_set_servo_pin"
><value name="name"
><shadow type="analog_pin"
><field name="pin">AnalogPin.P13</field></shadow
></value
><value name="value"
><shadow type="math_number"
><field name="NUM">5</field></shadow
></value
><next
><block type="device_set_servo_pulse"
><value name="value"
><shadow type="analog_pin"
><field name="pin">AnalogPin.P8</field></shadow
></value
><value name="micros"
><shadow type="math_number"
><field name="NUM">1500</field></shadow
><block type="math_map"
><value name="value"
><shadow type="math_number"
><field name="NUM">0</field></shadow
><block type="pins_i2c_readnumber"
><field name="format">NumberFormat.Int8BE</field
><value name="address"
><shadow type="math_number"
><field name="NUM">0</field></shadow
></value
><value name="repeat"
><shadow type="logic_boolean"
><field name="BOOL">FALSE</field></shadow
></value
></block
></value
><value name="fromLow"
><shadow type="math_number"
><field name="NUM">0</field></shadow
><block type="pins_pulse_in"
><field name="value">PulseValue.Low</field
><value name="name"
><shadow type="digital_pin"
><field name="pin"
>DigitalPin.P9</field
></shadow
></value
></block
></value
><value name="fromHigh"
><shadow type="math_number"
><field name="NUM">1023</field></shadow
><block type="pins_pulse_duration"></block></value
><value name="toLow"
><shadow type="math_number"
><field name="NUM">0</field></shadow
><block type="spi_write"
><value name="value"
><shadow type="math_number"
><field name="NUM">0</field></shadow
></value
></block
></value
><value name="toHigh"
><shadow type="math_number"
><field name="NUM">4</field></shadow
></value
></block
></value
><next
><block type="device_set_digital_pin"
><value name="name"
><shadow type="digital_pin"
><field name="pin">DigitalPin.P9</field></shadow
></value
></block
></next
></block
></next
></block
></next
></block
></next
></block
></next
></block
></statement
></block
><field name="pin">DigitalPin.P0</field
><field name="pulse">PulseValue.Low</field></block
></xml
>
124 changes: 2 additions & 122 deletions libs/core/blocks-test/test.blocks
Original file line number Diff line number Diff line change
@@ -1,127 +1,7 @@
<xml xmlns="https://developers.google.com/blockly/xml"
><variables></variables
><block type="pins_on_pulsed" x="0" y="0"
><field name="pulse">PulseValue.Low</field
><value name="pin"
><shadow type="digital_pin"
><field name="pin">DigitalPin.P5</field></shadow
></value
><statement name="HANDLER"
><block type="device_set_analog_pin"
><value name="name"
><shadow type="analog_pin"
><field name="pin">AnalogPin.P9</field></shadow
></value
><value name="value"
><shadow type="math_number"
><field name="NUM">5</field></shadow
></value
><next
><block type="device_set_analog_period"
><value name="pin"
><shadow type="analog_pin"
><field name="pin">AnalogPin.P10</field></shadow
></value
><value name="micros"
><shadow type="math_number"
><field name="NUM">20000</field></shadow
></value
><next
><block type="device_set_digital_pin"
><value name="name"
><shadow type="digital_pin"
><field name="pin">DigitalPin.P6</field></shadow
></value
><value name="value"
><shadow type="math_number"
><field name="NUM">5</field></shadow
></value
><next
><block type="device_set_servo_pin"
><value name="name"
><shadow type="analog_pin"
><field name="pin">AnalogPin.P13</field></shadow
></value
><value name="value"
><shadow type="math_number"
><field name="NUM">5</field></shadow
></value
><next
><block type="device_set_servo_pulse"
><value name="value"
><shadow type="analog_pin"
><field name="pin">AnalogPin.P8</field></shadow
></value
><value name="micros"
><shadow type="math_number"
><field name="NUM">1500</field></shadow
><block type="math_map"
><value name="value"
><shadow type="math_number"
><field name="NUM">0</field></shadow
><block type="pins_i2c_readnumber"
><field name="format">NumberFormat.Int8BE</field
><value name="address"
><shadow type="math_number"
><field name="NUM">0</field></shadow
></value
><value name="repeat"
><shadow type="logic_boolean"
><field name="BOOL">FALSE</field></shadow
></value
></block
></value
><value name="fromLow"
><shadow type="math_number"
><field name="NUM">0</field></shadow
><block type="pins_pulse_in"
><field name="value">PulseValue.Low</field
><value name="name"
><shadow type="digital_pin"
><field name="pin"
>DigitalPin.P9</field
></shadow
></value
></block
></value
><value name="fromHigh"
><shadow type="math_number"
><field name="NUM">1023</field></shadow
><block type="pins_pulse_duration"></block></value
><value name="toLow"
><shadow type="math_number"
><field name="NUM">0</field></shadow
><block type="spi_write"
><value name="value"
><shadow type="math_number"
><field name="NUM">0</field></shadow
></value
></block
></value
><value name="toHigh"
><shadow type="math_number"
><field name="NUM">4</field></shadow
></value
></block
></value
><next
><block type="device_set_digital_pin"
><value name="name"
><shadow type="digital_pin"
><field name="pin">DigitalPin.P9</field></shadow
></value
></block
></next
></block
></next
></block
></next
></block
></next
></block
></next
></block
></statement
></block
><field name="pin">DigitalPin.P0</field
><field name="pulse">PulseValue.Low</field></block
></xml
>

0 comments on commit 2d585b3

Please sign in to comment.