Skip to main content

Posts

MSc meets Micro:Bit

I have recently been teaching a module on Internet Programming on a MSc Computing programme (see related links), and was looking for a way to introduce a little bit of physical computing to finish of the module - micro:bits offer a route. So a bit of context; most of the students on the module had first degrees in either networking or software engineering; so before they start the module they are competent in programming with Javascript, HTML, CSS and PHP. Therefore the module looked to develop new areas such as introductory blockchain ,  virtual reality via the web (e.g. WebVR), using social media sources; but lastly looking at physical computing leading to an insight into the Internet of Things (IoT). As part of this last topic gaining some experience of programming and very simple networking was looked at using the micro:bit. An activity was produced where: they, in pairs, initially replicate some code and work out how it worked; they then took the code and experim...

Summary of Robots at BCS Northampton

On the 17th April 2018 I had the honour of presenting a public talk on robots for the Northampton Branch of the Britsh Computer Society (BCS). This post aims to summarise the session. The session was really from a personal perspective and journey, covering where I think robots in home and schools are going, and an overview of some of the projects I have been involved. First, part was the presentation - the slides are shown below. Robots Talk British Computer Society Northampton_17_4_2018 from Scott Turner The videos used in the presentations are shown below. The first video is an introduction and welcome from Red the Nao robot. Next video shows a programmed Cozmo, using Anki's graphical programming language. Second section of the session was playing with the robots. Red the Nao , an Anki Cozmo and an UBtech Alpha2 and having a play with a Crumble -based junkbots.  Crumble junkbots were used on PC and Raspberry Pi via Pi-top CEED . Red ...

How to produce a Microbit neural network

This is really part two of a set of post  in response to a question from Carl Simmons ( @Activ8Thinking ) concerning building a   micro:bit  simple neuron.  In the previous post a single neuron was produced. This post looks at producing a network of neurons, ie. neural network; looking to solve the problem that a single neuron can't solve, making an Exclusive OR gate (XOR) 1. Quick Overview 1.1 The neuron itself Inputs are going to be binary Weighted sum is bias+W1*input1+w2*input2 If weighted sum>=0 then the output is True (T on the LEDs) or '1' If weighted sum<0 then the output is False (F on the LEDs) or '0' 1.2 The XOR Essentially for the two input case if the two inputs are different then the output is True. The figure below shows the arrangement of the connections; pin 2 is the output of the neurons. The two micro:bits/neurons on the left of the picture taking in the two inputs, the same inputs go to these two neurons; the ...

Microbit Neuron - producing a single neuron using a microbit

This post is in response to a question from Carl Simmons ( @Activ8Thinking ) about has anyone built a microbit simple neuron. Quick Overview Inputs are going to be binary Weighted sum is bias+W1*input1+w2*input2 If weighted sum>=0 then the output is True (T on the LEDs) or '1' If weighted sum<0 then the output is False (F on the LEDs) or '0' First attempt - A simple gate using the buttons A and B So first attempt uses the A and B buttons on the Microbit as the two inputs and it produces T for true and F for false on the LEDs. So the weights produce an AND if the bias is changed from -2 to -1 you get an OR. More Physical Solution for Single Neuron So in this case the buttons are removed and P0 and P1 formed the inputs the weights are the same as in the previous example with the bias of -2 being used to produce a AND gate. Programming-wise this is a simpler solution than the previous one, no converting button presses into inputs. ...

WebVR playtime 2: video, 360 video and objects

This is going to be a short series of articles about some experiments with WebVR Web based Virtual Reality - in this case based on the wonderful A-Frame  ( https://aframe.io )   .  In the first post  WebVR playtime 1: Basics of setting up, images and rotating blocks .  I looked at setting up a scene and then rotating an object. In this post, I going to recap the basics, then look at adding video, 360 degree video, and models developed elsewhere. 1. The approach and setting up I chose to use A-Frame ( https://aframe.io )  inside Thimble ( https://thimble.mozilla.org  ); Thimble was selected for four reasons it is an  online   editor,  simple to use, it is free and you see the preview immediately. In Thimble though try to keep the image or video file sizes small. You can pretty much treat it as HTML, after you have added the script file shown in bold. <!DOCTYPE html> <html>   <hea...

WebVR playtime 1: Basics of setting up, images and rotating blocks.

This is going to be a short series of articles about some experiments with WebVR Web based Virtual Reality - in this case based on the wonderful A-Frame  ( https://aframe.io )   . Ok, a bit of context, I have been working with some MSc students on this area and we have been exploring this area together - I love learning from and with my students. Firstly, it is great fun and nowhere near as hard as I thought it was going to be when I first started.  1. The approach My approach is to use A-Frame ( https://aframe.io )  inside Thimble ( https://thimble.mozilla.org  ). Thimble was selected for four reasons it is an online editor,  simple to use, it is free and you see the preview immediately. Its main downside is the size of images and videos has to be relatively  small and not too many of them. 2. How easy is it? You can pretty much treat it as HTML, after you have added the script file shown in bold. <!DOCTYPE html> <ht...

Gesture controlled python robot unicorn (or is it a rhino)

In the previous two post I built and played with a robot unicorn from  Do it Kits https://doitkits.com/product/robot-unicorn/ . In the first post,  python was used to get it to move forward, backwards, left, right and stop. The second post discussed using a second microbit to send the movement instructions via the microbit's  radio module. This post looks at extending the idea to using the accelerometer to pick up directions and send them to the robot unicorn (that still seems weird to write). Microbit's accelerometers, using the x and y directions, provide the inputs and then send the direction commands. The robot unicorn code is the same in the second post , the new code for the gestures is shown below.  This a work in progress it detects x and y changes together so it does have a tendency to do one direction and then the other. This needs further work. All my code for the robot unicorn projects can be found at:  https://github...