Start with MakeCode!

adafruit_products_MakeCodeLaserTag.jpg
MakeCode for Circuit Playground Express allows for great functionality with a few code blocks.

The Adafruit boards in this guide may be programmed in Microsoft MakeCode. The laser tag program above was written by teens using MakeCode for Circuit Playground Express. MakeCode Arcade works with PyBadge. And Maker MakeCode works with several other Adafruit boards, including Gemma M0.

All versions of MakeCode work pretty much the same for all Adafruit boards -- only the blocks available are different. They're great for students for many reasons.

adafruit_products_PyBoardAstroFloatTest.jpg
MakeCode Arcade allows boards like the Adafruit PyBadge and Adafruit PyGamer to use code blocks specifically tailored to game development.

MakeCode is Easy to Learn

The quickest and easiest way to get started coding electronics is with a drag-and-drop programming language (sometimes called a graphical or visual programming language). The best-known and most popular graphical language, Scratch from MIT, is the basis for many languages used by educational kits and products, including MakeCode.

Drag-and-drop languages let you build programs by picking command blocks from a menu and sticking them together on the computer screen -- eliminating the need to type in commands or to pay attention to formatting and syntax.

But that doesn't mean a block-based codes aren't real computer languages! They teach the same basic concepts of programming as text-based languages. With MakeCode, it's possible to write complex programs using just the standard basic blocks, which include loops (repeat), logic (if-then-else), math, and variables. There are also advanced blocks that let you create functions, arrays, strings, and more.

adafruit_products_MakeCode_Maker_Gemma_Sample.jpg
MakeCode Maker allows for boards like Adafruit Gemma M0 to be graphically connected to external components and programmed.
All versions of Microsoft MakeCode are designed to be run only in the Chrome/Chromium browsers at this time. Fortunately this web browser is available for Mac, PC, Linux variations, portable devices and Chromebook.

MakeCode is Easy to Use

MakeCode can be used online, for free, from almost any computer or mobile device. There's nothing to download -- it will keep running in the Chrome browser, even if you go offline.

If you have Windows 10, you can also download an app that works offline and lets you read data from your board's sensors in real time.

Best of all, since MakeCode is designed specifically to work with physical boards, it shows you a simulation of the board you're using (and sometimes additional electronics as well). That means students can continue to work on projects outside the classroom and test them out, even if they don't have the microcontroller at hand!

In addition, saving your work is a breeze. Unlike Scratch, students don't have to sign up for an account. They can just "publish" their project, which creates a URL link they can open again from any computer. They can also share the link with others.

However, the MakeCode site doesn't let students search through user-created programs to find a specific project or kind of project (although you can sometimes find them with a general Google search).

This guide was first published on Aug 06, 2019. It was last updated on Aug 06, 2019. This page (Start with MakeCode!) was last updated on Oct 10, 2019.