Skip to main content

Posts

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

Pimoroni Envirobit - Light and LED

In a previous post, the Envirobit (  https://shop.pimoroni.com/products/enviro-bit  )  for the Microbit was played with getting temperature, humidity and pressure  ( https://robotsandphysicalcomputing.blogspot.com/2021/06/pimoroni-envirobit.html ).  In this short post a quick experiment using the sound and light sensor, to turn LEDs on the board to turn off and on beyond on light level. The code is set up when a clap happens nearby, light level is used to 'decide' whether the LEDs are turned on or off, below a threshols the LEDs go on above it the LEDs are turned off, Makeecode  Using Makecode makes this relatively easy to implement and fun. All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with. Twitter @scottturneruon

Pimoroni Enviro:bit -

Finally got to play with something that has been my list of things to play with, the Pimoroni Enviro:bit Weather Kit  https://learn.pimoroni.com/tutorial/tanya/building-the-enviro-bit-kit  (see below)- a nice kit based around Pimoroni's enviro:bit device which uses microbit and adds a number of sensors including temperature, pressure and humidity; as well as a microphone. Programming is via MakeCode; extensions can be added using the Extension option and searching for envirobit. Getting sensor information: So a quick experiment to work through the temperature, pressure and humidity sensors, a brief bit of code to do this is shown below: Responding to sound The microbit used with the kit was a V1, so this device added a microphone to the systems (V2 already has the microphone built-in). In the code below the microbit to react to a clapping sound. To develop further. There is still various things to try out the like the light sensors. As well as the expert blocks - what their fu...

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

10 mosts read posts on the Robots and Physical computing Blog - May 2021

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  Q uick Play with SonicPi I often play with the brilliant Sonic Pi  https://sonic-pi.net/   for a bit of fun, but let's be clear I have no musical ability. April 2021 Top 10 most read post on Robots and Physical Computing blog Most read posts on the Robots and Physical computing Blog Popular posts from this blog Make yourself a virtual gallery 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 simulation. PS3 Controller to move a USB Robot Arm Guest Blogger Hiren Mistry, Nuf...

Quick Play with SonicPi

I often play with the brilliant Sonic Pi  https://sonic-pi.net/   for a bit of fun, but let's be clear I have no musical ability. To get my head around it I tried turning thee one tune I know "Hot Cross Buns" for the recorder into a tune. I found a useful webpage  https://newt.phys.unsw.edu.au/jw/notes.html  to turn the notes into the MIDI number (60, etc) . Played with the synthesier sounds and choose tech_saw just because I liked it. The code is below use_synth :tech_saws 2.times do   play 71   sleep 0.5   play 69   sleep 0.5   play 67   sleep 0.5 end 4.times do   play 67   sleep 0.25 end 4.times do   play 69   sleep 0.25 end play 71 sleep 0.5 play 69 sleep 0.5 play 67 Also tried it with changing the synth to prophet Also tried to make it a bit more mournful (possible slightly aggressive) with minor chords - I used  https://en.wikipedia.org/wiki/Minor_chord#:~:text=In%20music%20theory%2C%20a%20minor,is%20called...

April 2021 Top 10 most read post on Robots and Physical Computing blog

Most read posts on the Robots and Physical computing Blog Popular posts from this blog Make yourself a virtual gallery -  March 06, 2021 This short post builds on the previous posts (below), unless ... Eggbot 2- the drawing crumble junkbot. figure 1 An earlier post    https://robotsandphysicalcomputing.blogspot.com/2021/04/junkbots-2-eggbot2.html  discussed the start of the deve... 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... Junkbots 2 - eggbot2 A new iteration of the junkbots project or more accurately the Crumble-based eggbot sub-project ( https://robotsandphysicalcomputing.blogspo... WebVR 3 Playtime: Augmented Reality I am going to try to persuade you that using A-Frame it is not hard to do some simple Augmented Reality (AR) for free, via a browser, but th... Scratch Robot Arm It is not physical but...