MakeCode Tips


Writing and Testing Code

  • To make your code easy to test, write it with an on button A click block as input. When it works, move the code into a sensor block.

  • Add music or lights to indicate when each piece of code is running.

  • If you can’t figure out how to start coding something, look for similar programs you can copy. Find sample programs at https://makecode.adafruit.com.


Where to Look Up Information

  • Hover over the block to see a pop-up with information.

  • Click on the question mark at the top of the page to open the Help menu. Click on an option to open a sliding window. Clicking on a topic will open up more information. The options are:

  • Go directly to Adafruit MakeCode Reference.


Comments

  • Right-click on a block and choose the Comment option. This lets you leave notes to explain what you are doing, for yourself or others.


Click images to enlarge

How to See the Code on your CPX

  • From the Adafruit MakeCode home page, click on Import.

  • Choose Import File.

  • Go to the CPLAYBOOT drive on your computer and choose the CURRENT file.

  • It should open in the MakeCode editor.


Programming Servos

How to work with standard (positional) and continuous servos: https://makecode.adafruit.com/courses/maker/general/coding/servos


Learn About the Circuit Playground Express (CPX)and MakeCode