Skip to main content

Posts

Produce a Microbit python neural network 1: Without the microbit initially

These two posts are really extensions of a set of post in response to a question from Carl Simmons ( @Activ8Thinking ) concerning building a micro:bit simple neuron. In those, the Microsoft MakeCode was used. In this two-post series is going to go through building neurones and neural networks in Python and by the end of the second post a python-based microbit neural network Post 1 (this one) A  single neuron and a simple neuron network will be produced in Python are produced. Post 2 looks at producing a network of neurons, ie. neural network using the idea from post 1 but using a three microbits.; looking to solve the problem that a single neuron can't solve, making an Exclusive OR gate (XOR) 1. Overview and non-microbit neuron 1.1 Overview:  The characteristics of the system will be: 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 weigh...

Robots and Physical Computing most popular posts during July 2019

Popular Posts Cool Adafruit PyGamer #1 I seem to play with Games software more and more (e.g. the recent post  My first Pygame zero attempt ) and that is not a problem at all. Thi... 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 PyGame Zero Apollo Lander #Apollo50th With all the excitement of the 50th Anniversary of the first Moon Landing and the world record attempt Moonhack  https://moonhack.com/ , I w... Micro:bit, Servo control with Micropython or blocks You can control servos (small ones) from a Micro:Bit directly. Following a link from the David Whale (Twitter  @ whaleygeek ) , thank you, t... Speech with EduBlocks on BBC microbit The microbit is a great piece of kit, not least of which because of the range of programming languages and tools t...

Simple PyGame Zero Apollo Lander #Apollo50th

With all the excitement of the 50th Anniversary of the first Moon Landing and the world record attempt Moonhack  https://moonhack.com/ , I wanted to experiment with PyGame Zero a little more. So I created my own, very simple, Moon Lander game using Python and PyGame Zero. The lander has to pass through a red rectangle on the surface as it accelerates to the surface. Left and Right keys move it sideways and the up key gives it a boost. When the lander passes through the red rectangle it makes a noise; if it misses (or after it passes through the rectangle) it resets to a new position and starts again. Two images were needed The lander image came from  https://www.kissclipart.com/apollo-program-apollo-lunar-module-lander-moon-landing-wgwzny/  shared by  Xfanmy.  This n eeded to shrunk by about x10 to fit. Surface came from Vector Designed By from Pngtree.com An image from the game, the code and a link to the repository are shown below, please f...

Cool Adafruit PyGamer #1

I seem to play with Games software more and more (e.g. the recent post  My first Pygame zero attempt ) and that is not a problem at all. This post is another one. The most recent AdaBox from Adafruit  (see above) was based around their PyGamer Starter Kit and it is great fun. This is a microcontroller based, open-source Retro gaming emulator; or is it a cool handheld gaming device that you can write your own games for. It can be programmed in CircuitPython, Arduino, but I been trying it out in the Beta version of  MakeCode Arcade  and if you have used MakeCode for the microbit this very much the same (see below). A nice feature about this is you can share - this code example (shown above) was developed by my son (and is shared with his permission) after about an hour of playing - the emulator below shows the game in action. My future plans with it so far: - Investigated the features available in MakeCode Arcade for this console; - Play ...

My first Pygame zero attempt

I attended the brilliant #ExaBytes19 on 28th June 2019 , among many very good sessions, I went to Jon Witts ( @jonwitts ) session on PyGame Zero [ 1 ]. Pygame zero is meant for Educational use and teaching programming through game development. Impressed with Pygame Zero relative simplicity, I have had a go myself. The Game! A Bee buzzes around the screen and a player moves to avoid it; if the bee and player meet the player's image changes and a sneezing sound is produced (I just fancied have a short cute noise). Both the bee and the player characters wrap around the screen. A very helpful source of advice on getting started on using Pygame can be found at [ 2 ]; my example takes the game produced there as a starting point. If you want to explain of what Pygame does previously mentioned page[1] and the page describing the built-in  functions [3 ], I found a great help. All the images were PNGs, the player characters were produced using  https://www.bitmoji.com...

Codey Rocky the new robot.

I recently tried out a new (well new to me) robot Codey Rocky - and yes I am going to tell people it's name is Rocky- for STEM outreach activities. I trialed it at recent Girls in STEAM event at the University of Northampton, UK and along with Red the Nao , it seemed to be positively received. This is a slightly feline looking robot (it is the ears, though a bit hard to see in the image above) produced for the company MakeBlock. Programming it is most easily done through an app on a tablet (see below). It is very Scratch-like and the children seemed to pick up on that quite quickly and started producing their own code, the example below is one example they produced. One group decided to set themselves the challenge of getting Rocky to travel along a line of them and they succeeded. Admittedly the challenge is not very hard, but the interesting point was they both decided as a group what to do and made it happen. Rocky has many programmable features, moves around on ...

Robots and Physical Computing blog's 10 most popular posts in May 2019

Popular Posts Programming Anki's Vector robot With the sad news that Anki is shutting down ( https://www.vox.com/2019/4/29/18522966/anki-robot-cozmo-staff-layoffs-robotics-toys-boris-sof... Top 10 popular post on Robots and Physical Computing Blog - April 2019 Popular Posts Lego Robot and Neural Networks An overview of using Lego RCX  robots for teaching neural networks present at worksho... New unicorn robot For a few weeks I have had this kit - Smartibot - waiting to play with - finally got around to it. A cardboard-based, app-controlled, AI... 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 Turne... USB Robot arm control with Python and Raspberry Pi I was asked recently if the USB robot arm could be programmed - I knew the answer was yes. The Arm came from the CBiS Education Robot Arm ... ...