They then went into the garden, and had fun measuring the temperature and light levels.
Unfortunately I lost Max - my 6 year old - at this point. I think he'd had enough. The next project was creating a compass and I didn't think he'd understand that too well, so decided to continue with just Anton, who is 9.
I explained how the compass heading worked in degrees, which he pretty much already knew from school.
The idea was to make a compass that displayed an up arrow on the screen as you were facing North. As you got close to North, other arrows would appear to show you were getting near and tell you which way to turn.
He didn't have any problem understanding the concept, so we went through putting in the program together.
However, when loaded onto the micro:bit, he couldn't seem to find North at all. We adjusted the range at which the arrows would appear, but still no joy. So I suggested printing out the compass heading when you press a button. We did that, but found that the reading was moving all over the place. It looked as though the compass needed calibrating. So we added another button press to allow us to calibrate the compass whenever we wanted to.
This time, after the calibration, it worked fine.
Here is the code we used:
I think this was a good demonstration of how things may not work how you expect them to first time - especially with sensors. It also showed how to go about getting more information from the program (i.e. displaying the current compass bearing) to debug.
The next project was going to be creating a step counter for Max to take on walks. However, the examples I've seen all use the 'shake' event, which, unless you strap the micro:bit to your ankle, doesn't seem to count many steps.
So I wrote a quick micro python program to measure the accelerometer readings as Max walked a few steps.
Analysing the data meant that I could come up with a better algorithm for measuring steps, but it was a bit complicated for the kids to stay interested.
So instead I want to move on to getting the micro:bits talking to each other. I think this should engage them a little more.
However - the micro:bit has a challenger - "Minecraft". Both boys are really into Minecraft and have just discovered how to download Minecraft mods. Now they want to be able to code their own.
I looked into it, but it requires quite a complicated setup and Java code which I don't think they're ready for. However, I found the 'Minecraft Modding For Kids For Dummies' book, which uses the 'learntomod.com' website to code mods. This is a block based programming language and it looked quite interesting, so I've bought the book. I think it's going to take a while for them to get into this, and we'll carry on with the micro:bit, but I'll go through the book with Anton to see if he can get into it.
So I may need to rename this blog at some point ...
No comments:
Post a Comment