Microsoft MakeCode

Help - Extension Building

Hi
I’m developing an extension with GitHub and would like some help.
I am new to developing extensions and want to know how to add a block that turns on a certain amount of LEDs.
If you use the following link, you can see what I already have.
https://github.com/dillonbarnes/microbit-screen-as-a-line
I’ve been using the BETA Deep Dive lessons on Mixer to help.

Please reply quickly.

Here are the docs on custom blocks.

1 Like

Looks like you got the gist of it. Do you already have a javascript function that turns on the led? Once you have it, you turn it into a block by adding the special comments.

Do not add block definitions directly into main.ts as they will show up as grey blocks. Instead, follow the steps below to add a new file, custom.ts , and add all your blocks in that file.

What does it mean by ‘grey blocks’?

Are they just blocks that are visible, but won’t do anything?

I’m building on your project that you made in Mixer and trying to create my own blocks using what you said on the stream.
I haven’t really done much.

I will do a deep dive on custom blocks in the stream.

1 Like

Thanks!
I might not be able to watch live, but I’ll definitely watch it at some point in past streams.