Skip to main content

Posts

Showing posts with the label neural network

Top 10 viewed posts 2021 on the Robot and Physical Computing Blog

Speech Recognition in Scratch 3 - turning Hello into Bonjour! The Raspberry Pi Foundation recently released a programming activity Alien Language , with support Dale from Machine Learning for Kids , tha... PS3 Controller to move a USB Robot Arm Guest Blogger Hiren Mistry, Nuffield Research Placement Student working at the University of Northampton. How to use a PS3 Controller to... Scratch Robot Arm It is not physical but CBiS Education have release a free robot arm simulator for Scratch.  Downloadable from their site  http://w... Tinkercad and Microbit: To make a neuron The free online CAD (and so much more) package Tinkercad  https://www.tinkercad.com/ under circuits; now has microbits as part of the list ... Escape the Maze with a VR robot - Vex VR You don't need to buy a robot to get programming a robot, now there are a range of free and relatively simple to start with robot simula... Easy, Free and no markers Augmented Reality - location based AR For a few years...

Making a neural network in Tinkercad from Microbits

Tinkercad and microbit neural network In a previous post I produced a single neuron based around microbits in Tickercad - see here . To extend this the basic ideas discussed in that the previous post where extended to three microbit joined together. In  other words a network of neurones or neural network. Basic requirements of a neuron are Requirements  - By altering the bias (or w0 in the example), weights change the behaviour of switches changes. -when switch is pressed a variable x1 or x2 is set to 1 depending on which button is pressed and when released it goes to 0.  - if (bias+w1*x1+w2*x2)>=0 then a T for True appears of the LEDs otherwise F for False is shown. So by selecting the weights and connecting the outputs (p2) from the microbits labelled as Red and Green in the image above as inputs to the yellow microbit 'neuron' we can form a neural network. Switches as the inputs and the screen on the yellow 'neuron' as the output of the network showing true (T) or...

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. ...

Scratch for Neurones

1. Single Neurone Instructions: Set the inputs by pressing the buttons marked input 1 and input 2 (Red is off(False or 0) and Green is on(True or 1)) Change the weights by changing weights 1 to 3, wx goes with input x and weight 3 is the bias. To activate the neuron you need to click on the the yellow ball ('the neuron'). The video below show it in action and explains the code. To see the code go to  https://scratch.mit.edu/projects/131892234/  . A slight modification click on the bell to change the weights The code is available at  https://scratch.mit.edu/projects/171190294/ 2. Training a Neurone In this part, the training of a neuron all written in Scratch is tackled. The video shows it action and you can have a go at using the software yourself at the end of the post. The Scratch code can be found at  https://scratch.mit.edu/projects/132915502/ All opinions in this blog are the Author's and should not in any ...

Lego Robot and Neural Networks

An overview of using Lego RCX  robots for teaching neural networks present at workshop in 2011. Derby presentation from Scott Turner The video below shows the robot trying out sets of weights for two neurones, until a set of weights are found that enable the robot to go around the circle. As a part of a set of tools I have found the following useful for teaching the principles of simple neurones.  Example code: import josx.platform.rcx.*; public class annlf{  public static void main(String[] args)  {   int w[][] ={//put weights here};   int o[]={1,1};   int s1,s2,res1,res2;   int sensor1=0,sensor2=0;   robot_1 tom=new robot_1();   Sensor.S1.activate();   Sensor.S3.activate();   for(;;){    sensor1=Sensor.S1.readValue();    sensor2=Sensor.S3.readValue();    LCD.showNumber(sensor1); ...