This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from microbit import * | |
from emoji import * | |
while True: | |
display.show(😃) | |
if accelerometer.was_gesture('shake'): | |
display.show(😡) | |
sleep(2000) | |
if button_a.was_pressed(): | |
display.show(💖) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# microbit-module: emoji@0.1.0 | |
# First we add a comment that this is a microbit-module and | |
# give it a name and version number in the format major.minor.patch eg. emoji@0.1.0 | |
from microbit import Image | |
# We import the image class from the microbit module | |
😃 = Image.HAPPY | |
😡 = Image.ANGRY | |
💖 = Image.HEART |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The MIT License (MIT) | |
Copyright (c) 2016 British Broadcasting Corporation. | |
This software is provided by Lancaster University by arrangement with the BBC. | |
Permission is hereby granted, free of charge, to any person obtaining a | |
copy of this software and associated documentation files (the "Software"), | |
to deal in the Software without restriction, including without limitation | |
the rights to use, copy, modify, merge, publish, distribute, sublicense, |