Coding
-
Select and drag the
on start
block to the left and drop it on the bin. -
From the Pins menu within the Advanced menu, select and drag a
digital write pin P0 to 0
block to the code area and attach it within theforever
block. Change the 0 to 1. -
From the Basic menu, select and drag a
pause (ms) 100
block to the code area and attach it underdigital write pin P0 to 1
block. Select 100 and Choose 1 second.
Your code should look like this:
-
Right-click on
digital write pin P0 to 1
block and select duplicate. Drag the duplicated block and attach it underpause (ms) 1000
block. -
Select the little dropdown arrow next to *P0 and select P1.
-
Right-click on the
pause (ms) 1000
block and select duplicate. Attach the duplicated block underdigital write pin P1 to 1
block.
-
Right-click on
digital write pin P0 to 1
and select duplicate attach the duplicated block underpause (ms) 1000
block. -
Select the 1 and type 0 within the
digital write pin P0
block. -
Right-click on
digital write pin P0 to 0
block and select duplicate attach the block under thedigital write pin P0 to 0
block. Select P0 and choose P1. -
Right-click on
digital write pin P1 to 0
block and select duplicate and attach it under the original block. Select P1 and choose P2. Change the 0 to 1. -
Right-click on
pause (ms) 1000
and select duplicate and place the duplicated block underdigital write P2 to 1
block.
-
Right-click
digital write pin P2 to 1
block and select duplicate and attach it belowpause (ms) 1000
block. Change the 1 to 0. -
Right-click on
digital write pin P1 to 1
and select duplicate attach the duplicated block under thedigital write pin P2 to 0
block. -
Right-click on
pause (ms) 1000
and select duplicate and attach it under thedigital write pin P1 to 1
block. -
Right-click on
digital write pin P1 to 0
block and select duplicate connect the duplicated block under thepause (ms) 1000
block.