16.07.2015 Views

MicroBit-Quick-Start-Teacher-Guide

MicroBit-Quick-Start-Teacher-Guide

MicroBit-Quick-Start-Teacher-Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Creating your own tutorials02We’re going to start by adding code that will checkfor the input of the buttons.Click on the while button in the on-screenkeyboard, which will create a while true loop.PREVIEW03Click on the do nothing statement inside thewhile loop. Then click on the if button in the codekeyboard to create an if-then-else statement.Select the condition (this is displayed in red).04Click micro:bit in the on-screen keyboard andselect button is pressed. This will automaticallydefault to button A. If you test your program at thispoint, nothing will happen.05Click the do nothing statement under if-then.Select micro:bit in the on-screen keyboard andthen find the show string button. Click after thespeech marks in the code, and then click edit inthe code keyboard. Type in the scrolling text youwish to appear and click the tick button.06Your code should now scroll the text when youpush button A. Test your program to see if it works.29

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!