+ from adafruit_circuitplayground import cp ++ +
+ while True: ++
+ cp.red_led = True ++ +
+ while True: ++
+ if cp.button_a: ++
+ cp.red_led = True ++ +
+ cp.pixels[0] = (0, 0, 255) ++ +
+ from microbit import * ++ +
+ display.show(Image.HEART) ++ +
+ while True: ++
+ if button_a.is_pressed(): ++
+ display.show(Image.HAPPY) ++
+ if button_b.is_pressed(): ++
+ display.show(Image.SAD) ++ +
+ while True: ++
+ temp = temperature() ++
+ display.show(temp) ++ +
+ while True: ++
+ display.show("Your name") ++ +
+ a. Access your settings: +
+ +
+ File -> Preferences -> Settings
+
+
+ Code -> Preferences -> Settings
+
+ .
+
+ b. Check the
+
+ "Device Simulator Express: Preview Mode"
+
+ setting.
+
+ from adafruit_clue import clue ++ +
+ clue_data = clue.simple_text_display(title="CLUE!", text_scale=2) ++
+ while True: ++
+ clue_data[1].text = "Hello World!" ++
+ clue_data[3].text = "Temperature: + {} + ".format(clue.temperature) ++
+ if clue.button_a: ++
+ clue_data[5].text = "A is pressed!" ++
+ else: ++
+ clue_data[5].text = "A is not pressed!" ++
+ clue_data.show() ++ +
+ Make sure there are bitmap (.bmp) pictures of your choice in the same directory as the code file. +
+ ++ import board ++
+ from adafruit_slideshow import SlideShow ++
+ ++
+ slideshow = SlideShow(board.DISPLAY, auto_advance=True, dwell=3, fade_effect=True) ++
+ while slideshow.update(): ++
+ pass ++ +
+ clue.pixel.fill(clue.GREEN) ++ +
+ import board ++
+ import displayio ++
+ from adafruit_display_shapes.rect import Rect ++
+ ++
+ splash = displayio.Group(max_size=20) ++
+ board.DISPLAY.show(splash) ++
+ ++
+ rect = Rect(80, 20, 41, 41, fill=0x0000FF) ++
+ splash.append(rect) ++ +
from adafruit_circuitplayground import cp+ +
while True:+
cp.red_led = True+ +
while True:+
if cp.button_a:+
cp.red_led = True+ +
cp.pixels[0] = (0, 0, 255)+ +
from microbit import *+ +
display.show(Image.HEART)+ +
while True:+
if button_a.is_pressed():+
display.show(Image.HAPPY)+
if button_b.is_pressed():+
display.show(Image.SAD)+ +
while True:+
temp = temperature()+
display.show(temp)+ +
while True:+
display.show("Your name")+ +
a. Access your settings:
+ +File -> Preferences -> Settings
Code -> Preferences -> Settings
. b. Check the "Device Simulator Express: Preview Mode"
setting.
from adafruit_clue import clue+ +
+ clue_data = clue.simple_text_display(title="CLUE!", text_scale=2) ++
while True:+
clue_data[1].text = "Hello World!"+
clue_data[3].text = "Temperature: {"{}"}".format(clue.temperature)+
if clue.button_a:+
clue_data[5].text = "A is pressed!"+
else:+
clue_data[5].text = "A is not pressed!"+
clue_data.show()+ +
+ Make sure there are bitmap (.bmp) pictures of your choice in the same directory + as the code file. +
+ +import board+
from adafruit_slideshow import SlideShow+
+
slideshow = SlideShow(board.DISPLAY, auto_advance=True, dwell=3, fade_effect=True) ++
while slideshow.update():+
pass+ +
clue.pixel.fill(clue.GREEN)+ +
import board+
import displayio+
from adafruit_display_shapes.rect import Rect+
+
splash = displayio.Group(max_size=20)+
board.DISPLAY.show(splash)+
+
rect = Rect(80, 20, 41, 41, fill=0x0000FF)+
splash.append(rect)+ +