Code with MakeCode — image 1 of 1

projects_mc_forever.jpg
details

Here is where we set up the order of our modes, and turn the fairy light strand on and off. If you want to add more modes you can do it here by clicking the + button at the bottom. Be sure to increment the mode number in each block you make, and don't forget to change numModes in the previous block if you add or subtract modes.

The digitalWrite lines control pin A3, to which we've attached our fairy lights. We turn the light strand on by setting A3 to "high." Easy!

The digitalWrite code blocks are found under ADVANCED > PINS.

Back

Search