Aberdeen Art Gallery Micro:Bit workshops 2024

We have some workshops coming up in January/February 2024 in the Aberdeen Art Gallery, thanks to our successful application to the “Creative Funding Programme” from Aberdeen City Council in the summer!

We’ll be running free “drop in” sessions, where you can find out about Microbit s & “break out boards” (adding more inputs & outputs) to make really cool interactive things…

And we’re also running some “inventor” workshops (£45 per person) – but you get to keep £45 worth of kit! (Micro:bits, Breakout boards, sensors, LEDs, wires, breadboards, electronics etc). – Some spaces are sponsored by SRCN Solutions – so if you need financial assistance & would love to come to the workshop, get in touch to secure a sponsored space.

you can sign up via the #AAGM website

Supported by SRCN Solutions

#YesNo (“Do you care?”)

Step By Step PDF of how to build a “Yes/No” custom buttons display with a Raspberry Pi Pico, 2 x Custom Made Buttons & 2x7segment 4 digit LED backbacks

We have uploaded a PDF of the steps to build a “Yes/No” Custom Button + LED Digit displays on a raspberry Pi Pico , with step by step guide on how to make the custom wooden buttons, and the easy implementation of the adafruit_ht16k33 library for the LED Backpacks.

You can also download the zip file of the code  here.

Number to Money counter with CircuitPython on Tiny2040

Phil’s working on some interactive electronics for a project, and he was asked to create a counter that could show how much money you could make from 20p recycling deposits using CircuitPython & a Tiny2040

Phil’s working on some interactive electronics for a project, and he was asked to create a counter that could show how much money you could make from 20p recycling deposits. The counter + button in a #circuitPython was easy to implement (see other “weekly project” posts for a “how to”) – But playing an MP3 file has become incredibly easy with CircuitPython, having the library / code built in to the system! so no need to add a new library or even extra electronics to your CircuitPython Powered Board of Choice! (We’ve been using the Raspberry Pi #Pico & the Pimoroni #Tiny2040 )

Below is a short video of the Tiny2040 + button + mono speaker counting up when the counter value is sent to a function that converts it to a list of MP3’s to play.

Tiny2040 + Button + Mono Speaker playing MP3s

Phil took a while to create an algorithm to create a “sentence” that stitches together the necessary files needed… using small MP3 files saved to the 8mb Tiny2040. The numbers 1 to 20 were recorded, then, 30, 40, 50, 60, 70, 80 & 90. Phil also created with a speech synthesiser, “pence”, “and”, “pound”, “pounds” – which can then create any number up to 999 (Thousands + were unnecessary at the moment!) When it reaches “£100” – a clip saying “you’ve made a lot of money, perhaps donate it to charity?” is spoken, then the counter resets !

The code below is Phil’s “Robust” programming… which works nicely, and can even cope with increments of 5p – but single counts break it (his “logic” should be improved – but the 5 / 10 / 20p increments work!

# SPDX-FileCopyrightText: 2020 Jeff Epler for Adafruit Industries
# Custom Code by Philip Thompson / Digital Maker CIC
# SPDX-License-Identifier: MIT

"""CircuitPython Essentials Audio Out MP3 """
import board
import digitalio
from time import sleep

from audiomp3 import MP3Decoder

try:
    from audioio import AudioOut
except ImportError:
    try:
        from audiopwmio import PWMAudioOut as AudioOut
    except ImportError:
        pass  # not always supported by every board!

button = digitalio.DigitalInOut(board.GP0)
button.switch_to_input(pull=digitalio.Pull.DOWN)


audio = AudioOut(board.A0)
# You have to specify some mp3 file when creating the decoder
mp3 = open("none.mp3", "rb")
decoder = MP3Decoder(mp3)
decoder.file = mp3
audio.play(decoder)

# calculate money from number stuff

def convertArrayToString(a):
    return(' '.join(map(str, a)))

def last_digit(num):
    if 10 < num < 20:  # it's a teen!
        return [str(num)+".mp3"]
    else:
        last_digit_unsigned = abs(num) % 10
        return [str(num)+".mp3"] if last_digit_unsigned == 0 else [str(num)[0]+"0.mp3", "5.mp3"]

# used in making a sentence of the value of the number
ppp = ['pence.mp3']
lb = ['pound.mp3']
lbs = ['pounds.mp3']

def numToMoney(v):
    if v < 20:  # unique "quick returns"
        return([(str(v)+".mp3")] + ppp)
    elif (v > 9999):  # no one will make this much money from recycling!?
        return(["too_much.mp3"])
    elif (15 < v < 100):  # just pence
        return(last_digit(v) + ppp)
    else:
        tupV = str(v)
        if len(tupV) == 3:
            if (tupV[0] == "1"):
                lll = lb
            else:
                lll = lbs
                    
            if (tupV[1] + tupV[2] == "00"):  # flat £                
                return([tupV[0]+".mp3"] + lll)
            else:
                if tupV[1] != "0":  # not a "x pounds tens pence
                    return([tupV[0]+".mp3"] + lll + ["and.mp3"] + last_digit(int(tupV[1]+tupV[2]))+ppp)
                else:
                    return([tupV[0]+".mp3"] + lll + ["and.mp3"] + ["5.mp3"] + ppp)
        else:
            if (tupV[1] + tupV[2] + tupV[3] == "000"):  # flat £
                return([tupV[0]+"0.mp3"] + lbs)
            else:  # complicated number x pounds y (z) pence
                tA = tupV[0] + tupV[1]
                tB = tupV[2] + tupV[3]
                if (tB == "00"):
                    s = [tA+".mp3"] + lbs
                elif (tB == "05"):
                    s = [tA+".mp3"] + lbs + ["and.mp3"] + ["5.mp3"] + ppp
                else:
                    s = [tA+".mp3"] + lbs + ["and.mp3"] + last_digit(int(tB)) + ppp
                return(s)


# res = arr[::-1] #reversing using list slicing
def money(n):
    moneyArray = []
    moneyArray.extend(numToMoney(n))
    #print(moneyArray)
    for w in moneyArray:
        decoder.file = open(w, "rb")
        audio.play(decoder)
        #print("playing", w)
        while audio.playing:
            sleep(0.1)

counter = 0

while True:
    
    while audio.playing:
        pass
    
    if button.value:
        counter += 20
        money(counter)
        sleep(0.3)
        if counter > 9999:
            counter = 0

The Button is in Pin GP0 & the Speaker Signal Out is in pin A0 … you can’t get simpler! Amazing! MP3 files played with CircuitPython on a Tiny2040 – Done!

Driverless Car workshops – a five week course

Digital Maker CIC recently completed two 5-week driverless car workshops in Aberdeen. Northfield academy’s Science Club & Transition Extreme After School Club each had an exciting and challenging set of workshops for children aged 12+. Digital Maker CIC believes that these workshops are a “first” for the UK. Both projects were funded by Aberdeen City Council’s “U-decide” (participatory budgeting project).

The participants learned about Machine Learning, Engineering & design of the 1:16th scale cars, raspberry Pi terminal commands, to interface with the cars, computers    & cloud computing interfaces and driving the remote-controlled cars.

Working in teams of four, the pupils were given tasks of constructing & managing their cars, “training” and improving their driving skills, as the better the car is driven, the better the Machine Learning model will be. The pupils could quickly train & then produce ML models (via cloud computing), giving exciting results, as the cars drove themselves around the 4m2 tracks we use. The pupils quickly learned that the better they drove the cars, the automated driving improved.

The teams also tried to add obstacles (orange cones) into the modelling, creating various results (success & failure), but, with more training & time, the pupils understood that their cars would “get better” with time.

We’d like to thank Northfield Academy & Transition Extreme Sports Ltd for their support & use of space, in order that we could run the workshops. We are working on extending the workshops to Aberdeenshire & eventually have a North East interschools competition for the Driverless Car technology.

If you’d like more information, or want your school to participate in this project, please do get in touch!

AwesomeTech@digital-maker.co.uk

Digital Maker CIC – CPD for the College Development Network

Digital Maker CIC had the privilege of being asked to run a robotics challenge workshop for the CDN (College Development Network Scotland) in Dundee & Angus College’s Gardyne campus on Friday 28th of September for over 20 College Lecturers.

Teams from all over Scotland joined us for a fun day, exploring, building & programming robots in order to compete in various challenges once the teams were ready. We gave each team a CamJam robotics kit with minimal worksheets / instructions and spent around 30 mins building the kits, using raspberry Pi Zeros & piTop Ceeds (to control / interface with the robot rover via  5 meter USB cable). the Edinburgh team took the initiative to make their rover wirelessly controlled, downloading & installing software through their own phone (extra points there!)

Once everyone had built & played with their rovers, controlling it via simple on-screen button & programmable interfaces (Custom Adapted Blockly by Digital Maker CIC), we then added a line detection sensor, giving the participants experience in electronics & GPIO use on the Pi Zero. The challenge was to create a line following algorithm using only 1 sensor & the Blockly interface, to get the team’s rover around a line path in the quickest time. There were a lot of different approaches, using repeat loops, “if statements” and more. One of the most elegant solutions was a simple algorithm by West Lothian College.

All teams produced line following algorithms with varying degrees of success, but, all teams were resilient & spent time honing their algorithms, trying various tweaks & fixes based on their observations, critical thinking & experimentation, which was great to see. The fastest line follower was under 1 minute, the longest (complete circuit) was just under 3 minutes.

Some teams managed to start exploring adding an ultrasonic distance sensor (HC SR04) to tackle the minimal maze we had brought along too, but, time had got the better of us, and after 6 hours of playing, experimenting, trying and learning, time was up!

We’d like to thank Kenji Lamb for organising the event & asking Digital Maker CIC to facilitate the workshop. We are planning to run a 2nd CDN Robotics CPD challenge with Kenji in 2019… so if you are interested, or want more information, please do get in touch!

College Development Network – DM CIC Robotics workshop

We were asked by the College Development Network to put on a robotics workshop for their CPD provision, so we gladly said YES!

Here’s a link to the course in Dundee & Angus College. They have kindly agreed to host the event at their Gardyne campus, and CDN are looking for college staff keen to exercise their engineering, programming and design skills on the 28th of September. 

Full details & links are here : https://www.events.cdn.ac.uk/ehome/362505?&t=30f2d8676e7ed69370facb7507bd3a4e

New Mission To Mars in Riverbank Primary School

Digital Maker CIC have started their 7 week course “Journey to Mars” in Riverbank Primary, Aberdeen.

We have previously run this workshop in St Peter’s, Woodside & Seaton Primary Schools, where pupils get hand on experience of electronics, computer programming, team work, design & engineering tasks, as well as experiencing critical & creative thinking, growth mindset, communication & problem solving.

The 7 weeks consist of, “scene setting”, where we discuss space travel, Scottish geography, NASA Mars exploration history, the solar system & anything the pupils bring up when shown the videos & images we bring. We then build a working Rover, working with CamJam robotics kits & laser cut PTFE chassis, the pupils have to construct & wire their robots from illustrations & trial & error. We love this task, as we see a lot of “Growth Mindset” creeping in, it always starts with “this is too difficult” to “yeah! look at our finished robot!”… emphasis on “trying” and making mistakes is key to our teaching philosophy. A lot of knowledge transfer can come form this task too, where pupils that complete the task early, ask to help others & show pitfalls & tips to complete their robots.

The following weeks, we design & build garages / habitats for our rovers from cardboard & MakeDo construction kits. We then explore making a simple program in a customised Blockly environment on the Raspberry PI to control the robot from a set start point to drive into the base, creating a repeatable algorithm. We learn about coordinates & instructions & what an algorithm is & does.

We then start introducing sensors & electronics to the kit, a line follower, an LED, a distance sensor… with around 4 weeks of deep learning & play / experimentation in using electronics & computer coding to control robotic tasks.

We have learned a lot ourselves when teaching this workshop & would like to thank all the schools that have had us so far, it’s really rewarding to see pupils surprising themselves with what they are capable of & enjoying challenging tasks.

Mission to Mars workshops

Digital Maker CIC have been working in some schools in Aberdeen, thanks to the Aberdeen City Council “U Decide” participatory funding we won last year.

We’ve just finished in Seaton & Woodside primary’s, running 7 week courses with the P6 & P7 themed around a “Mission to Mars”. During our time with the pupils, we’ve covered, Scottish Geography, Design, Electronics, Maths, Mapping, Engineering, Computing & Programming, pulling a wide range of skills & activities together, to create & manage working Rover (Robotics vehicles).

We’ve had fantastic feedback from the pupils & teachers. Below is a lovely testimonial from Ms Masters, P7 Teacher in Seaton.

I have loved having Awesome Tech in our class, and so have the children. They have helped teach skills such as resilience and applying a growth mindset, and there have been so many amazing ‘lightbulb’ moments! The children are applying skills and meeting outcomes that can be tricky for teachers to incorporate otherwise- and can be beyond our own subject knowledge! It has given confidence to pupils who find other areas of the curriculum challenging and allowed them to hone their skills in working as part of a team. It’s rare to have visitors who not only have such subject knowledge but are also so effective at working with children- my class think Martin and Phil are just the best and look forward to every visit!

Line Following robotics Rover & Raspberry Pi set up for programming