Category Archives: Devices

How to Build a Wildlife Camera with the BBC micro:bit and Samsung’s micro:bit App

After much fiddling about I’ve finally managed to work out how to get Samsung’s micro:bit app working properly with my micro:bit. Before I tell you how you can use it to turn your phone into a wildlife camera there are two very important points to bear in mind:

1. You need to make sure you have the latest version (1.5.3 – 11 October 2016) of the app installed. I couldn’t get my micro:bit to control my phone’s camera with previous versions. So install/reinstall the latest version of the app now.

2. Every time you flash new code to your micro:bit you need to un-pair your micro:bit from your phone (go to ‘Settings’ then ‘Bluetooth’ on your phone) then re-pair it via the micro:bit app. Very, very important point this. It took me ages to work this out.

OK, now we’ve got that out of the way, here’s how to build a wildlife camera.

You will need:

  • Wildlife camera kit 1 x BBC micro:bit, its USB lead, and its 3V battery pack.
  • 1 x PIR motion sensor (I used this one from Squirrel Labs. Strictly speaking it’s a 5V motion sensor, but seems to work OK with 3V of power from the micro:bit.
  • 3 x crocodile clips.
  • 1 x male to female jumper lead. Not essential, but makes connecting the crocodile clips to the motion sensor a lot easier.
  • A Samsung smartphone (I used an J5) with the Samsung micro:bit app (1.5.3 or later) installed.

First, adjust Sensor setupthe sensitivity and time delay on the motion sensor. Turn both orange dials anti clockwise as far as they’ll go.

This sets the motion sensitivity to it’s least sensitive setting (left dial in the photo above) and the time delay between sensing to the shortest possible interval (right dial in the photo above). Five seconds for this motion sensor.

Next, connect your jumper lead to the middle pin (labelled OUT) on your PIR motion sensor. This just makes it a bit easier to connect the motion sensor to the micro:bit with crocodile clips.

Now connect your motion sensor to yMotion sensor to micro:bit wiringour micro:bit with crocodile clips:

  •  The ‘GND’ pin needs to be connected to the GND ring on the micro:bit.
  • The ‘OUT’ pin (jumper lead) needs to be connected to ring P0 on the micro:bit.
  • The ‘VCC’ pin needs to be connected to 3V ring on the micro:bit.

Now you’re ready to code. I created the following code in the Block Editor on my computer. Use your computer, not your smartphone to write code. It’s very, very annoying trying to code on your phone. The screen is just too small.

Wildlife camera code

All the time nothing is sensed, a simple line pulses across the display – – – But when something is sensed the motion sensor sends an electric signal out on its ‘OUT’ pin, which is detected by the micro:bit as a change from 0 to 1 on ring P0 (the ring the ‘OUT’ pin is connected to by the crocodile clips).

All the time a 1 is detected on ring P0, the micro:bit will change its display to ! ! ! and send three commands (via bluetooth) to your smartphone. The first launches your smartphone’s camera app. The second command initiate a countdown of 5 seconds, then the third command actually takes a photo and saves it to the ‘Images’ folder on your phone. You need the time delay between the ‘launch’ and ‘take photo’ commands because the camera doesn’t kick into life the instant the app is launched. But you may be able to get away with a delay of less than 5 seconds. I guess it depends on what model of phone you are using.

Once you’ve written the code (on your computer) connect your micro:bit to your computer via the USB cable, then compile the .hex file and drag it onto your MICROBIT icon.

Now un-pair your micro:bit from your phone (go to ‘Settings’ then ‘Bluetooth’ on your phone) then re-pair it via the micro:bit app.

Don’t forget to press the micro:bit’s reset button after pairing!Paired micro:bit

Now your ready to test. It takes a good minute for the sensor to start up properly. After that you should be able to trigger your phone’s camera into life by waving your hand in front of the sensor.

If it doesn’t work, double check your crocodile clip connections and/or try increasing the sensitivity of the motion sensor by gradually turning the orange dial (the one on the right if the dome it pointing upwards) clockwise. Try a tiny increment. These motion sensors are very sensitive.

If all is working well, your phone will say ‘Selfie time!’ every time the camera is triggered into action. This is extremely annoying. To turn off this alert go to ‘Settings’ then ‘Accessibility’ then ‘Hearing’ on your phone and switch on ‘Turn off all sounds’. Remember to turn this off again when you want to use your phone as a phone again, or you won’t be able to hear anyone!!!

So far I’ve only managed to capture my cat rolling about on a rug in our lounge. To make a true wildlife camera I need to design some sort of water proof case for the whole ensemble, and leave it outside somewhere (the bird table maybe) for a while. But for now, I’m very pleased with what I’ve got and I’m finally able to say I quite like the Samsung micro:bit app.

20161017_132532 Cookie the Cat


How to fix ‘Unfortunately micro:bit has stopped’ error.

Screenshot_2016-09-20-18-15-42Screenshot_2016-09-20-18-16-00J5 microbit error

A few weeks ago, keen to use my micro:bit to control my Google Nexus 5’s camera I tried to install the Samsung micro:bit app. I was a little surprised when I was told (by the app) that it wasn’t compatible with my hardware. A bit annoying I thought, but it’s Samsung’s app so I thought maybe they’ve coded it so it only works on Samsung devices.

So last week when my new Samsung Galaxy S5 arrived I was keen to try the app again. Surely it will work with Samsung’s most popular smartphone. This time there was no polite incompatibility message, the app installed in an instant. I then used the app to pair my micro:bit and S5, and after a couple of failed attempts (where I didn’t follow the instructions properly it must be said) it appeared to have paired successfully. Brilliant I thought. Now lets have some fun.

Well, unfortunately that’s where the fun ended, because every time I tried to connect to my micro:bit with the app I instantly got the message ‘Unfortunately micro:bit has stopped’. I tried un-pairing and re-pairing my devices, updating my S5, and I even updated the firmware on my micro:bit. But still the same error message.

Then I did what I should have done in the first place: I googled the error message. I didn’t get a direct hit, but I did notice a lot of people were getting remarkably similar error messages with other apps installed on the S5 (and other smartphones). This was their solution and I can confirm it fixed my micro:bit app error a treat.

  1. From the home screen, tap ‘Apps’, then ‘Settings’.
  2. Scroll down to ‘Applications’ then tap ‘Application manager’.
  3. Scroll down to, and tap micro:bit.
  4. Tap the ‘CLEAR DATA’ button, then ‘Clear’ to confirm. This should clear the cache as well.

Unfortunately, now that the micro:bit app is working on my S5, I’m sorry to report that it isn’t actually very good. Writing code is extremely fiddly and it takes forever to compile. It could be that I’m not using it properly, so I’ll persevere for now. Watch this space for a full review of the app.

Broken Handwriting Using SMART Board Interactive Flat Panel/TV


A little off topic this one, but here’s the answer to something that’s been puzzling me for a while. Why is it you get gaps in the lines when you write on some SMART Board interactive flat panels and not others?

I originally thought it must something obscuring the leds that run round the side of these flat panels, so I gave them a good dust. No joy. Then I tied fiddling about with the PC’s graphics properties, making sure my resolution was full HD, and the image was fitting the panel perfectly. No joy. So then I convinced myself it was the driver software, so reinstalled the latest version of it. Still no joy.

Finally I realised the answer is simple: its the pen you are using. Teacher’s occasionally lose the two (yes two!) pens that come with SMART Board flat panels, so decide to use something else instead. Most of the time this is fine. A finger works perfectly. But occasionally, they decide to use something with a fine nib. Well who doesn’t like writing with a fine nibbed pen? And it’s the fine nibbed pen that causes the gaps in the lines. So there you have it, a simple solution to what at first appears a complex technical problem.

Not sure if this is an issue with all other flat panels/TVs, but I can say for certain it also happens with Prowise panels, because I tested one. So if your handwriting is breaking up, take a look at the pen you’re using first, before you spend hours working your way through technical fixes.


Old style (thin nibbed) SMART Board pens on the left don’t work well with interactive flat panels. Note that the new style pens on the right (they give you two to lose!) have much wider nibs.

UPDATE: You also need to check the SMART Board driver has detected the correct model of flat panel/TV. Right click on the SMART Board monitor in the system tray and select ‘SMART Settings’ then run the ‘Connection Wizard’. Check the model it detects is the same as the model you have. The model number is printed on the top right of the flat panel/TV.