4.3 KiB
4.3 KiB
TouchDevelop Lessons
Overview of TouchDevelop lessons for the micro:bit.
@section full
~column
LED screen
- plot guided
guided tutorial
video available
- plots an LED [guided tutorial]
- blink symbols
docs
- clear screen
- point
- set brightness
micro:bit
functions
Basic
- show number
- show string
- forever - show image
guided tutorial
- forever - show animation - two frames 1a
- forever - show animation - two frames 1c
- forever - show animation - two frames 1 d
- forever - show animation - multliple frames
Language
Variables
- global variables
guided tutorial
- local variable - create image, show image
- data types: number, boolean, string, image
Statements and control structures
- if
- for
- for loop nested - plot script
- while
- while - show string, show number, show animation
docs
- while - create image
- return
- break
- function
- assignment operation
:=
Maths
- arithmetic operators (
+
,-
,*
,/
, mod) on numbers - comparison operators (such as
>
,=
) on numbers - the math library
- the bits library
Logical
- boolean operators (
not
,or
,and
) on booleans
Strings
- concat operator combines strings
~
~column
Input
- button is pressed
- on button pressed
- acceleration
- compass heading
- calibrate
- running time
- on shake
- on screen up
- on screen down
- on logo up
- on logo down
~
~column
Authoring & Other Bits
- TouchDevelop editor
- markdown
- creating interactive tutorials
- run scripts in a web browser
- run scripts on your micro:bit
- libraries