1. Home
  2. /
  3. Makecode
  4. /
  5. Blink an LED

Blink an LED - Makecode Typing CST Test

Loading…

Blink an LED — Makecode Code

Turns the built-in LED on and off repeatedly.

basic.forever(function () {
	led.toggle(2, 2)
	basic.pause(500)
})

Makecode Language Guide

Microsoft MakeCode is a block- and text-based coding platform for creating interactive programs, games, and hardware projects using microcontrollers like micro:bit, Circuit Playground Express, and more.

Primary Use Cases

  • ▸Teaching coding and computational thinking
  • ▸Creating microcontroller-based projects
  • ▸Prototyping simple games and simulations
  • ▸Interactive electronics with sensors and LEDs
  • ▸STEM workshops, classrooms, and maker labs

Notable Features

  • ▸Block-based drag-and-drop programming
  • ▸Text editor support for JavaScript and Python
  • ▸Hardware simulation environment
  • ▸Extensive hardware extensions and libraries
  • ▸Cross-platform web-based IDE with offline apps

Origin & Creator

MakeCode was developed by Microsoft around 2016 as an educational platform to teach coding and electronics to students using a low-barrier, interactive environment.

Industrial Note

Primarily used in education, STEM learning, and maker projects; not intended for large-scale commercial software development.

More Makecode Typing Exercises

Hello World in MakeCode (JavaScript view)Scroll Text on micro:bitDisplay a Heart IconButton A Pressed MessageCount from 1 to 5Display Random NumberTilt DetectionShow Multiple IconsTemperature Display

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher