24 October 2016

Day Three - Stopwatch Part Three

                                       Code Improvement










As I said in my last video, I will improve my code because it wouldn't stop entirely. Now here it is!
The issue was that when I pressed B it would only stop for five seconds. In the video I will explain how to enhance a micro:bit stopwatch with the main point of making the variable 'counter'.

After this video the micro:bit should:

1. When A is pressed, start counting.
2. When B is pressed, stop until A is pressed again.


Day Three - Stopwatch Part Two

                                The 100m Sprint


Here is my micro:bit stopwatch challenge. Unfortunately, the micro:bit wouldn't
stop entirely because I set the pause to five seconds. I'll do another video on it later.

21 October 2016

Day Two - Stopwatch Part One

Get in! I made my first micro:bit program. Here is how I made a basic stopwatch.


Step One                                         

Go on to the block editor on microbit.org. At first there will be a blank screen.

Step Two

Drag the 'set item to' block in the variable row on to the screen and rename the variable 'stopwatch'. Grab the block in the maths row that says zero. Snap it on to the previous block.Then cover this with the 'on A pressed' loop.

Step Three

Next, put a 'show number' block down with the variable name 'stopwatch' block in the number section under that, place a 'change item by one' block down. Change the item button to 'stopwatch' and put a forever loop over it.

Step Four

Now we're getting on to the tricky bit!(well for me it was) Duplicate step two but replace A with B, and crate a new variable called pause and replace it with 'stopwatch'

Step Five

Under the section you made in step two, at the bottom of the code use the variable row to add in set pause to false'. Your code should look like this: 

    

Step Six

Add this into the forever loop:
If pause = True
                      do  pause(ms) 5000                     

Step seven

This is the last step! Add in loose(don't connect it to anything else) 'set pause to ...false' Then, press compile and plug in your micro:bit. Drag the hex file to the micro bit file and... you're done!

My Verdict.

At first found it a bit difficult but hopefully it was easier for you as I tried to explain the instructions as clear as I could. Also for more micro:bit ideas go to: http://www.101computing.net/category/bbc-microbit/


For the video:



20 October 2016

Day One - Opening my BBC micro:bit!

                   MY MICRO:BIT

Today I got my BBC micro:bit. It came in a light blue box and had a portable AAA battery pack, a USB wire and two AAA batteries.

The micro:bit itself has two buttons: A and B for functional uses, a 5 x 5 light grid, compass navigation,Bluetooth and several connecting rings. Also, you should not touch the circuit board.
I've decided to use the Block Editor and MicroPython Editor for coding.

I can't stop looking at it even now! I should probably be going to bed but I'll finish the blog first. Anyway, for my first project  I'm going to be creating a stopwatch to time myself running from one end of the garden to another. Hopefully, I'll be faster than Usain Bolt. OK, maybe not that fast. Can I sprint 100m in 13 seconds? Find out tomorrow in my next blog!