Pflanzenbewässerung Lösung

Aus microbit - Das Schulbuch
Wechseln zu: Navigation, Suche

Grundsätzliche Überlegungen

xxx

Hilfestellungen und Lösung zum Pflanzenwächter

xxx

input.onGesture(Gesture.Shake, function () {
    if (Math.randomBoolean()) {
    	
    }
})
let anzahl_kopf = 0
let anzahl_zahl = 0
input.onGesture(Gesture.Shake, function () {
    if (Math.randomBoolean()) {
        anzahl_kopf += 1
        basic.showLeds(`
            . # . . #
            . # . # .
            . # # . .
            . # . # .
            . # . . #
            `)
    } else {
        anzahl_zahl += 1
        basic.showLeds(`
            . # # # #
            . . . . #
            . . # # .
            . # . . .
            . # # # #
            `)
    }
})

Komplettlösungen

xxx