Python activity – recreate Matisse’s Snail

 

Here’s a fun lesson with Python Turtle graphics I did with my Year 7s. They had done some Python before – mainly stuff with loops, making and breaking Caesar cyphers, but I think it’s fair to say that they did not love Python… until this lesson. The shapes and colours really engaged them and I think the dry code made more sense when applied to something visual and creative.

It would also work with younger children – year 5 and 6 should be fine… and older children too!

I’ve tweaked my resource to make it more generic and offer it here as a PDF: Matisse snail Python handout

A good extension is to get them to make their own patterns by tweaking the numbers, shapes and colours – I had some amazing patterns from a Year 9 class. I’ve also made a debugging activity based on this idea which works as a standalone lesson or as a follow-on from this. Worksheet to follow!

 

…and this week we had a special visitor who saw some Year 11 girls who’d never done any coding before quickly getting to grips with Python to make their own art by tinkering. You’re never too old to make your own patterns!

Posted in computers, education, ICT | Tagged , , , | Leave a comment

Updated URLs for your internet radio

PilLittleRadio v2 takes shape

I’ve just been doing my annual maintenance on my kitchen radio – it’s an old RaspberryPi with a lovely Pimoroni Displayotron3000, and it runs their lovely radio script. (You configure it by editing the dot3k.cfg file in ~/Pimoroni/displayotron/dot3k/advanced)

I’ve made lots of Raspberry Pi radios, including one you can control from your phone or tablet. Read more about them here: http://www.suppertime.co.uk/blogmywiki/piradio/

I was moved to tinker with it because of recent improvements to the analogue audio output of the standard audio jack – see https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=136445 for more details on that.

I found a few stations (NPR, ResonanceFM and MEATtransmission) have changed their URLs since I last tinkered, so here’s my current list, in case anyone finds it useful for a RaspberryPi radio or other internet radio project.

Though you only really need the first station on this list.

[Radio Stations]
fip128 = fip,http://icecast.radiofrance.fr/fip-midfi.mp3
BBC1 = BBC Radio 1,http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio1_mf_p
BBC1x = BBC Radio1xtra,http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio1xtra_mf_p
BBC2 = BBC Radio 2,http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio2_mf_p
BBC3 = BBC Radio 3,http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio3_mf_p
BBC4fm = BBC Radio 4FM,http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4fm_mf_p
BBC4lw = BBC Radio 4LW,http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4lw_mf_p
BBC4x = BBC Radio 4 Extra,http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4extra_mf_p
BBC5 = BBC Five Live,http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio5live_mf_p
BBC6 = BBC 6Music,http://bbcmedia.ic.llnwd.net/stream/bbcmedia_6music_mf_p
einws = BBC WS News, http://bbcwssc.ic.llnwd.net/stream/bbcwssc_mp1_ws-einws
npr = NPR,http://nprdmp-live01-mp3.akacast.akamaistream.net/7/998/364916/v1/npr.akacast.akam$
meat = MEATransMISSION,http://uk2.internet-radio.com:8118/
monocle = Monocle M24,http://radio.monocle.com/live
resonance = ResonanceFM,http://stream.resonance.fm:8000/resonance
purple = Purple Radio,http://uk1-pn.webcast-server.net:8184/
rte1 = RTE Radio 1,http://icecast2.rte.ie/radio1
share = Share Radio,http://tx.sharp-stream.com/icecast.php?i=shareradiorpmobilehigh.mp3
Posted in radio, Raspbian | Tagged , , , , | 2 Comments

MicroBit Happy Plant

I had a go at making Geekfish’s Happy Plant project myself – this aims to tell you if your plant is thirsty using a BBC MicroBit, a resistor, some nails and a bit of Python code. I edited the code slightly, as I had a 1.5K resistor rather than a 1.2K one, so I changed line 4 to KNOWN_RES = 1500

Happy Plant

I flashed the Python code to the MicroBit using the totes awesome Mu Python editor. I kind of guessed how the wiring should work by squinting at Geekfish’s video – I came up with this. It hasn’t blown up my MicroBit yet…

Happy Plant circuit diagram

Posted in computers, education | Tagged , , | Leave a comment

3 ways of making sound with the BBC MicroBit

Games on the MicroBit are way more fun when they make noise.

Here are 3 ways of making sound that I’ve tried with things I had lying around the house, in ascending order of usefulness / awesomeness:

ways of making sound on MicroBit

1) A loudspeaker. I bought this one from Pimoroni for a Raspberry Pi radio project that I’ve not yet completed. I attached it using crocodile clips from a MakeyMakey kit to pins 0 and GND on the MicroBit and ran some Python code on the MicroBit like this.

Pros: loudspeakers are quite easy to find.
Cons: fragile, highly magnetic – and very quiet!

ways of making sound on MicroBit

2) An old earpiece. No idea where this came from – an ancient radio perhaps. I attached the crocodile clips to the 2 pins on its jack plug.

Pros: Very loud. Cheap.
Cons: TOO loud. Do not place anywhere near your ear canal.

ways of making sound on MicroBit

3) A buzzer thingy from an Arduino kit. Not sure what its proper name is, but I had a couple of these as one came with a RaspberryPi CamJam kit too.

Pros: Very loud, cheap, tiny.
Cons: None!

So the buzzer is the way to go. I want to try a buzzer from a musical birthday card, but I can’t lay my hands on one at the moment – I have a hunch they would be really good too.

home-made battery pack

I also made my own battery pack – 2 AA batteries in a holder that I took off some broken Christmas lights – attach the + side to the 3v terminal on the MicroBit, and – to the GND terminal, and I have a switchable, portable power supply for making self-contained MicroBit projects.

Posted in Uncategorized | Tagged , | 1 Comment

Possible first Y7 Python MicroBit lesson

Here’s my first stab at a first Year 7 MicroBit lesson activity sheet – it assumes you’re using Mu as your editor, but not REPL (command line). It’s untested and will evolve with suggestions and with experience using it in class.

Students will learn how to write, flash and save code in Mu. They then learn about while True: loops, displaying built-in images, controlling the MicroBit using buttons A and B, the touch buttons and detecting shaking to trigger events.

Download PDF here. or see more generic up-to-date version here: https://github.com/bbcmicrobit/micropython/wiki/Ideas-for-first-Y7-Lessons

Posted in computers, education | Tagged , , , | Leave a comment