BorisBuilds
Published © CC0

Calliope: Coole Animation mit Zufallszahlen

Diese coole Animation sieht aus wie außerirdische Technik. Sie funktioniert ganz einfach mit Zufalleszahlen.

IntermediateFull instructions provided30 minutes94

Things used in this project

Hardware components

Calliope mini
Calliope mini
×1

Software apps and online services

MakeCode
Microsoft MakeCode

Story

Read more

Code

Der Code

Typescript
Den Code kannst du unter https://makecode.calliope.cc einfügen, wenn du auf den Reiter JavaScript gehst.
let helligkeit = 0
let y = 0
let x = 0
basic.forever(() => {
    x = Math.random(5)
    y = Math.random(5)
    helligkeit = Math.random(256)
    helligkeit = helligkeit - Math.random(201)
    led.plotBrightness(x, y, helligkeit)
    basic.pause(5)
})

Credits

BorisBuilds

BorisBuilds

10 projects • 12 followers
IoT professional. Working in IIoT and industry 4.0. Supporting Girls'Day, Jugend Hackt, Open Knowledge Foundation, Code for Hamburg and more

Comments