Žmurkajúci smajlík
Zo stránky SensorWiki
Zmurkajuci smajlik:
-
Program v blokovom jazyku
-
a jeho funkcia
basic.forever(function () {
basic.showIcon(IconNames.Happy)
basic.pause(100)
basic.showLeds(`
. . . . .
. # . . .
. . . . .
# . . . #
. # # # .
`)
basic.pause(100)
})
from microbit import *
while True:
display.show(Image("00000:09090:00000:90009:09990"))
sleep(100)
display.show(Image("00000:00090:00000:90009:09990"))
sleep(100)
#include <Adafruit_Microbit.h>
Adafruit_Microbit_Matrix microbit;
const uint8_t SMILE_1[] =
{ B00000,
B01010,
B00000,
B10001,
B01110,
};
const uint8_t SMILE_2[] =
{ B00000,
B01000,
B00000,
B10001,
B01110,
};
void setup() {
microbit.begin();
}
void loop() {
microbit.show(SMILE_1);
delay(1000);
microbit.show(SMILE_2);
delay(200);
}