Skip to main content

Posts

Showing posts with the label microbit

Popular posts May 2023

Microbit Remote Control CBiS Car I wanted to contol the CBiS micro:Bit Car via gestures whilst holding another micro:Bit (see Figure 1) I went for: - Button A in combinat... Coral Dev Board and Raspberry Pi This is the second of a planned occasional series of posts on playing with some of the current AI specific add-on processors for Intenet of ... 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... Crumblebot - explorer bot? In an earlier post I played with 4Tronix's CrumbleBot to make an edge follower robot ( http://robotsandphysicalcomputing.blogspot.co.uk/... Programming Robots Virtually 4: Preview of Edbot Studio In previous post I looked at a few on-line robot simulators (see links below) Programming VEX Code Programming  iRobot Simulator Programming... Top read post on Blog in Feb 2020 Popular Posts Moving Eyes with an Adafruit Adabox kit...

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

Hug Avoider 4 - micropython, Eggbot and speech

The last of the posts on the Hug avoider and the 4Tronix's Eggbit 4Tronix's Eggbit (in fact I bought three of them  https://shop.4tronix.co.uk/collections/bbc-micro-bit/products/eggbit-three-pack-special   :-) recently) is a cute add-on for the microbit. In three previous posts I looked at eggbit using microcode to  produce a hug avoider - warns when people at too close. - https://robotsandphysicalcomputing.blogspot.com/2021/12/hug-avoider-2-4tronix-eggbit.html -  4tronix Eggbit - cute and wearable - hug avoider Hug Avoider 3 - experiments with Python and 4Tronix Eggbit In this post using the buttons and adding (via Microbit V2 with its speaker) simple speech 1. Buttons Pins for the buttons pin8 - Green button pin12 - Red button pin14 - Yellow button pin`6 - Blue button     if pin12.read_digital()==1:         #Red Button         blank_it()     if pin8.read_digital()==1:         #Green but...

Microbit and Environment Measurement - Using Python

In two recent posts, Makecode was used with the Enviro:bit from Pimoroni to try out a few ideas ( https://robotsandphysicalcomputing.blogspot.com/2021/06/pimoroni-envirobit.html  and   https://robotsandphysicalcomputing.blogspot.com/2021/06/pimoroni-envirobit-light-and-led.html ). In this post Pyton using the Mu editor was used to try out the Enviro:bit. As in the makeCode version, Pimoroni has provided both a python library (via Github) but also within the Readme.md useful installation instructions. There is at the time of writing a possible typo; to get the BME280 sensor (temperature, pressure, humidity sensor) to work; you need to add parenthesis in the line  bme = bme280.bme280() After that, it works fine and includes potential altitude measurement which I don't think is in the Makecode version (though I could be wrong); I need to play with it a bit more. To experiment the code below was used test reading temperature (in Centigrade), humidity (%), and altitude (f...

4tronix Eggbit - cute and wearable - hug avoider

/ The ever-brilliant 4tronix have produced Eggbit https://shop.4tronix.co.uk/collections/microbit-accessories/products/eggbit;  a cute, wearable device, with ultrasonic sensors, buttons and LEDs for the microbit - I couldn't resist. Programming is through Makecode and an extension is available, to download and install. To use the extension, at the time of writing this, go through the add extension option and use the search box to add it  from  https://github.com/4tronix/EggBi t So what to do with it? Inspired by social distancing  (or not being a 'hugger')  created it so that when people get too close the RGB LEDs go out - simple but fun. The distance is set at 20cm for testing. The code is shown below. It was fun to do and perhaps swapping the settings around so the lights come on when people at too close might be more fun or using sound. This is a lovely device to play with and the look encourages play - just look how cute it is! The price is reasonable and th...

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

Dancing Kitronik's Game Zap - reacts to music

You will glad to hear this is only a short post.   In an earlier post, Build a Disco Cube:bit that reacts to music ; the vibrations of music, makes the cube sitting on a speaker with the volume pushed to 11 (just to test it of course) react to the music. The accelerometers values in the micro:bit, in the three axis, are feedback to change the neopixels colour. Simple but good fun. With some very minor (and I do mean minor) changes it works on the Kitronik's Game Zap - eight pixels are altered at a time instead of five but apart from that nothing more. The code in python is shown below: from microbit import * import neopixel, random np = neopixel.NeoPixel(pin0, 64) while True:     for pxl in range (3,64, 8):         rd=int(abs(accelerometer.get_x())/20)         gr=int(abs(accelerometer.get_y())/20)         bl=int(abs(accelerometer.get_z())/20)         np[pxl] = (rd, gr, 0)   ...

Sphero RVR

Sphero have a track record of making well sort of fast spherical robots (along with a few Star Wars ones) in a recent kickstarter campaign they have a released a tracked robot   https://www.kickstarter.com/projects/sphero/sphero-rvr-the-go-anywhere-do-anything-programmabl/description  - RVR and it is still fast and fun.   It does seem to be a step up, they are allowing more customisation with a expansion port and on-board power, aimed at connecting other pieces of hardware, for example, Microbit and Raspberry Pis.Even without these it is not short of sensors and lights  The simplest way to program it is still through the Sphero Edu App and its block programming providing a quick way to get going. This feels (to me) like a move towards the more 'traditional' robot hobbyists market - and that is fine. It comes almost completely built, so it is soon ready to go out of the box which is nice. I am interested to see what re...

Combining Beta Edublocks and Microbit Playground

I have recently been playing with Edublocks ( edublocks.org ) and the 4tronix's Microbit Playground (the appropriately named Super Kit)  controlling programmable pixels/neopixels   and a servo . Recently a beta version of the Edublocks (see above) has become available ( https://app.edublocks.org/ ) so I wanted to play with it a bit and, at the same time, combine control the servo motor and neopixels together via a potentiometer (see below). The block version of the code is shown below: The python version np = None port1 = None pot2 = None port3 = None from microbit import * import neopixel np = neopixel.NeoPixel(pin0, 8) pin2.set_analog_period(20)# your own code while True:   port1 = pin1.read_analog()   pot2 = port1//128   port3 = port1//8   np[pot2] = (255, 0, 128)   np.show()   pin2.write_analog(port3)   sleep(250)   np.clear() To see it action via GIPHY A few thoughts on the be...

Build a Disco cube:bit that reacts to music.

In a previous post Micro:bit and Cube:bit 'says' Hello  I introduced the start of me playing with the  4tronix Cube:bit . One of the things I want to try is get the cube to react to music, based around the accelerometers in a micro:bit picking up vibrations.  Luckily, in an earlier post, I had done something similar for the  Proto-Pic Micro:pixel  (see  Dancing Pixels  for more details).  Essentially the idea is  the vibrations from the music shake the micro:bit enough to give measurable changes in three axis, and these values are used to change the pixel's colour - in fact five pixels at a time. The code shown below is all that was needed: from microbit import * import neopixel, random np = neopixel.NeoPixel(pin0, 125) while True:     for pxl in range (2,125, 5):         rd=int(abs(accelerometer.get_x())/20)         gr=int(abs(accelerometer.get_y())/20)   ...

Microbit and Cube:bit 'says' Hello

Since seeing pictures of the 4tronix Cube:bit I have intrigued by it and now I have one. So what is it? It is a 3D array of neopixel-style LEDs, or another way of describing it a programmable box of LEDs (or just good fun). The option I went for the 5x5x5 array (125 LEDs) controlling it with a micro:bit, and the base for mounting and powering the grid. Instructions for putting it together can be found at  https://4tronix.co.uk/blog/?p=1770 . My main bit of advice is read the instructions carefully especially if you go for the 5x5 options, at the time of writing, you need to move a standoff around but it is all in the instructions. Admittedly I missed this step initially.  So to playtime, using a microbit I wanted to spell-out HELLO across the grid using the Micro:Bit JavaScript Blocks/MakeCode Editor. Basically, my solution revolved around creating two JavaScript functions to produce vertical and horizontal patterns on the grid (sounds good saying that -...

Getting Crabby with EduBlock for Microbit

This is really pulling together two recent posts, one when I started playing with Edublocks for the microbit  and one about playing with BinaryBots Crab  . The BinaryBots Totem Crab is available at  https://www.binarybots.co.uk/crab.aspx Here I going to use Edublocks ( https://microbit.edublocks.org/ ) by @all_about_code to control the claw of the Crab to close when button A is pressed (and display a C on the LEDs)  and open the claw when button B is pressed. For a discussion on the Crab and what the pins are, etc goto  http://robotsandphysicalcomputing.blogspot.com/2018/08/crabby-but-fun.html  for more details.  The timing of the opening and closing is controlled by how long the C or O takes to scroll across the LEDs. As an aside, but I found it interesting (it appeals to my geekiness), if you save the blocks, using the Save button; it stores it as an XML file, an example extract is shown below: Now I want to exp...