Introduction: Two Ways of Making a Drawing App

I know this drawing app only has a 5x5 pixel screen so you really can't make much but it's still fun.

Supplies

  • computer
  • mini USB cord
  • micro bit

Step 1: The First Way

This is not my favorite way but it is a little faster to draw with.

Step 2: The Inputs

drag out the following:

(on logo down)

(on logo up)

(on tilt left)

(on tilt right)

(on button A)

(on button B)

from INPUT

Step 3: Filling the Inputs

In (on logo down) put:

  • (forward 1 steps)

In (on logo up) put:

  • (back 1 steps)

in (tilt left) put:

  • (turn left)
  • (forward 1 steps)
  • (turn right)

in (tilt right) put:

  • (turn right)
  • (forward 1 steps)
  • (turn left)

in (on button A) put:

  • (pen up)

in (on button B) put:

  • (pen down)

Step 4: Downloading and Using It

To download, just plug the micro bit into your computer and press the download button.

To use, it's pretty simple. Just press A to start drawing, B to stop. Tilt the direction you want to go.

Step 5: The Second Way

I like this way better but drawing is slower.

Step 6: The Inputs

first you have to create a new variable called ( b or f )

drag out the following:

  1. (on button A pressed)
  2. (on button A pressed)
  3. (on button B pressed)

open the drop down on one of the (on button A pressed) and choose A+B

Step 7: Filling the Inputs

In (on button A pressed)

  • (forward 1 steps)

in (on button B pressed)

  • (turn right)
  • (forward 1 steps)
  • (turn left)

in (on button A+B pressed)

  • if <true> then ( ) else ( )

Step 8: Filling the If Then ( ) Else ( ) (part 1)

in the if < > put a ( 0 )=( 0 )

in the ( 0 )=( 0 ) put a ( b or f )=( false )

Step 9: Filling the If Then ( ) Else ( ) (part 2)

in if ( ) put:

  • (pen down)
  • (set b or f to ( 0 )

in the ( 0 ) put a <true>

in the else put:

  • (pen up)
  • (set (b or f) to ( 0 )

in the ( set b or f to < false> )

DONE!!!!!!!!!!

Step 10: Using It

Press A to go up. Press B to go right. Press A and B at the same time to start drawing and again to stop. If you go all the way to the right or top it will put you on the opposite side.

Block Code Contest

Participated in the
Block Code Contest