Skip to main content

Posts

Adafruit Circuit Playground reacting to music (updated with simulator)

This post looks at using the Adafruit Circuit Playground Express to react to music. I used Adafruit MakeCode ( https://makecode.adafruit.com/ ) to experiment with it.  The code is simple and shown below and using the acceleration in the x, y and z axis to selected values for RGB on the neopixels - the circuit is placed on a speaker and the vibrations cause the changes in the pixel RGB value. The 10 pixels are lit up in sequence, but it is so quick it is hard to see a difference between the pixels. The video below shows it action with music available from the YouTube audio library  “Eternal Structures” by Asher Fulero. 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

WebVR 5 Playtime: Augmented Reality to display Videos

In previous posts ( post 1 , post 2 ) I have raved over the brilliant combination of Mozilla's AFrame and Jerome Etienne's fantastic AR code - guess what this post is no different in that respect.  Here is the problem I was interested in - having a set of markers that when viewed, a different video plays for each marker.  Glitch is a great editor for this (for example  https://glitch.com/~ambitious-hub ) easy to use and it can stored assets (in this case a video). Add the assets by clicking on the asset folder and then use the add asset button, upload the file. You will need the URL for the asset this is what is included as a source in the HTML files; you get this by clicking on the asset and then copying the URL. So some initial code using Aframe and aframe-ar.js is shown below. This is set-up to display a video when the HIRO marker is shown to the camera. <!DOCTYPE html> <script src="https://aframe.io/releases/0.6.0/aframe.min.js"></scr...

It listens to me - Anki's Vector Robot

The Anki Cozmo is great fun to play with (loads of games to get it to do) and nice to program through the codelab ( https://robotsandphysicalcomputing.blogspot.com/2017/06/program-cozmo.html ) and is just so cute you want to play with it. But now Anki has released Vector ( https://developer.anki.com/blog/news/hey-vector/ ) with it's enhanced camera and built-in microphones, essentially better sensors; but the main feature (so far) has to the speech recognition. All request start with "Hey Vector", pause until the lights go blue; followed by commands for example - "my name is" which records your name and then learns your face. - "play blackjack" to not surprisingly plays games of blackjack with you. There are a load of commands, including to get the time, the temperature, etc. I am partial, to getting a fist bump from it. I have only just started exploring it (ok playing) there are loads of features I have yet to play with - just got to le...

University of Northampton - teaching and researching Blockchain recognition

Taken from:  University of Northampton recognised for being one of a handful of institutions teaching and researching Blockchain The University of Northampton has been recognised as one of only a handful of Higher Education (HE) institutions worldwide which are teaching or carrying out Blockchain research. Blockchain is a shared, replicated ledger that underpins technology such as cryptocurrency, but also sets out to provide the foundation for the next generation of transactional applications. Blockchain analyst website  Diar  has included the University of Northampton in a  list of just 28 HE providers that teach aspects of Blockchain and/or conduct research into it . Northampton does both. Postgraduate students on the  MSc Computing course are taught elements of Blockchain , including a general introduction to the basic concepts, plus coding and programming techniques. Meanwhile, various Northampton academics, led by Senior Lecturer in Educati...

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