By using this site, you are accepting "session" cookies, as set out in the site's Privacy Policy
Resources for learning about computing and programming . . .
See below for links to download ZIP files with a complete package of each day's handouts and resources. The handouts also include links to sites to download other software.
MyEasyPages™ - www.myeasypages.co.uk Use MyEasyPages™ to create a simple web page . . . . . . and show friends and family can see what you've produced
Arithmetic of Computers - www.arithmeticofcomputers.co.uk A structured guide to some of the basic maths of number systems and computers
Found something useful that isn't mentioned here? . . . Any ideas? Thoughts? Comments? Suggestions?
Then email me with details at Info@CodingIsFun.co.uk
CodingIsFun™ is FREE for non-commercial use, but . . . . . . COSTS time, effort and money to develop and maintain!
DONATIONS towards the cost of this and associated work, would therefore be much appreciated.
Thank You!
Not got a PayPal account? No problem! Just pay through PayPal with your credit or debit card.
Examples of suggested suitable donations (for personal / non-commercial / non-profit use) are:
PLEASE NOTE : The standard terms and conditions for use of this site are forpersonal / non-commercial / non-profit use ONLY. If you would like to use this site or any of the materials on it for anycommercial or profit-making activity, PLEASE CONTACT ME at Info@CodingIsFun.co.uk.
Back to main Resources page
This is an opportunity to look at another language (Python), another IDE (IDLE) and have another go at Scissors, Paper, Stone.
This is going to use the GPIO pins (the two rows of 13 pins - 26 in total) on the Pi. We'll connect them to the 3 boxes we used in the PIC session via a breadboard.
Raspberry Pi
Start by connecting all the usual bits to the Pi - but DON'T plug the power supply in or switch it on yet!
The breadboard I've used is an SYB-120 700 point breadboard. These are cheap and readily available on eBay. For anyone who's never used one, the idea is that there are lots of connection points and inside they are joined together in groups. If you hold it vertically, on this board there are 60 rows, each with 10 connection points (and also one column of 50 down each side, but we won't be using those). Each row has 5 connection points on the left, all joined inside - and 5 on the right, all joined - with a gap in the middle.
We'll use jumper wires to connect the breadboard to the GPIO pins on the Pi, so we'll need plenty of male to female jumper wires (readily available on eBay). We'll also need a few male to male jumper wires for connections between points on the breadboard.
Lastly we'll need some 470 ohm resistors.
See links on the first Raspberry Pi session page for links to relevant sources.
This image shows the pins on the Pi. A word of warning here - the Pi mostly runs on 3.3V - but the 5V0 GPIO pin (pin 2 - see below) exposes the raw 5V USB supply voltage. That 5V can be enough to kill the Pi permanently as there is no general voltage protection on the GPIO pins, so be VERY careful not to connect ANYTHING to that 5V pin. You might even want to cut off a female connector from a jumper wire and put it on the pin beforehand to stop anyone putting anything else on it.
Raspberry Pi GPIO pins
The wiring diagram (see link below) shows how to connect everything up and pin numbering on the Pi.
Start with the connections from 3 boxes to the breadboard down the left hand side (don't worry about the 3 VSS white wires for the moment).
Then plug in the 7 resistors (470 ohm) - the black rectangular blobs on the diagram. These are pull-up resistors on the switch inputs - the PIC had pull-up resistors built into the chip, so we didn't need these. The Pi doesn't, so we need extra external components. The idea is that the input pin is weakly connected to VSS (0V) via the resistor when the button is not pressed - but connected straight to VDD (3.3V in this case) when it is pressed. See the Circuit Components handout.
Breadboard Closeup
Now connect the Pi pins to the breadboard (don't worry about connections from pins 1 and 6 yet) with male to female jumper wires. It's a good idea to keep things colour coded - use the same colour wires here as for the corresponding wires from the boxes. Do make sure the resistor wires don't touch each other or anything else . . .
Now a couple of male to male jumper wires for the links shown to tie all the right hand ends of the resistors together.
Now plug the 3 white VSS wires from the boxes in.
And finally jumpers from the Pi pins 1 and 6 to the VDD and VSS connection points.
For the curious, the S and D in VSS and VDD stand for Source and Drain - with VSS being 0V and VDD being 3.3V Electrons are negatively charged and flow from negative to positive - i.e. 0V to 3.3V - so VSS is a source of elctrons and VDD is where they drain away.
Breadboard
Assuming you have all the other bits connected to the Pi as in the earlier session, you're good to plug in the power supply, switch on, log in and start the GUI.
Initially some of the LEDs on the boxes may light up. That's normal. At startup there isn't any defined configuration for the GPIO pins so don't try to make any sense of what you see at this stage.
Now start up the Python environment - IDLE3.
IDLE3 / Python on the Raspberry Pi
The File Open to open up the Python file (download below).
And Run, Run Module to run it.
Hopefully the game will now play in exactly the way it did on the PIC.
To stop the programme, close the Python Shell window - and click OKto kill the programme. But don't close the window with the Python source code.
OK - time now to explore the code.
First, note that it doesn't use curly braces ('{' and '}') to define blocks of code - it just uses the level of indent from the left-hand margin.
Next, look at the "initialize" routine - we have to start by telling the Pi which of the GPIO pins will be inputs and which will be outputs. Note that we've got a block of code towards the end of the file that defines all sorts of variables to have particular values. This is common in programming - these are in some sense arbitrary values, so by doing this we achieve two things. It makes it easier to use the values in the main body of the code as we are using descriptive names and don't have to remember or keep checking what values we need, so we'll probably make fewer mistakes. And by having all the values set in one place we can set them up once and then forget about them - and if we need to make any changes, we only have one place to look and one place to make the changes.
Now look at the "main" routine. This is the key entry point for our programme and is called from the "main()" statement right at the end of the programme - the ONLY statement that isn't in a separate routine. Every programme needs to know how to start and having a "main" routine is common - in "C" it's actually compulsory and the only way any programme can ever be started.
Think about "routines" as reusable building blocks of code that can be "called" from anywhere. They are an essential way to add structure to code. And mean that you don't have to keep rewriting similar chunks of code every time you need them - write the code once, put it into a routine and call the routine every time you need that code.
Note also that the "main" routine has a "while" loop. The value 1 (like anything else that isn't 0) equates to True, so the condition is always satisfied and the loop will run forever - just like the forever loop in Scratch.
We also have a timing routine to get things to run at a sensible speed. And can change the defined value for the delay time, so can spped up or slow down the game. Think about units of time milli means a thousandth - millisecond, millimetre, milli-anything else. What about other prefixes - micro (millionth), nano (billionth), pico (trillionth), kilo (a thousand), Mega (a million), Giga (a billion), Tera (a trillion) - hence units like Megabyte, kilometre, Gigahertz, microgramme.
Coding is Fun - Resources - 9 - Raspberry Pi
Coding is Fun - Resources - 9 - Raspberry Pi - Circuit Components
Coding is Fun - Resources - 9 - Raspberry Pi - Wiring
Coding is Fun - Resources - 9 - Raspberry Pi - Software
Python Official Web Site Python - www.python.org
This is a general list of possible additional resources that may be useful (in addition to those in the main Resources pages).
But please note that I have not tried using all of these so you'll need to put in a bit of groundwork yourself.
If you have any helpful comments on any of them or any others that might be added, please contact me at Info@CodingIsFun.co.uk.
Visual Studio is the name for Microsoft’s suite of Integrated Development Environments. 2012 is the latest version. Follow the Learn More link for downloads of versions for developing for Windows Desktop, Windows 8, Windows Phone and Web Sites. Express is the (slightly) stripped down free edition. Microsoft Visual Studio 2012 Express
The previous version, Visual Studio 2010 is also still available. Follow the See Download Details link for versions including the C# is the programming language. Other lnguages are available such as Visual Basic. Express is the (slightly) stripped down free edition. Microsoft Visual Studio 2010 Express
You might also be interested in Visual Studio 2010 for Windows Phone. With this you can develop XNA and Silverlight Apps for Windows phones (Silverlight also runs on PCs as well as Windows Phone 7). Microsoft Visual Studio 2010 Express
Somewhere in all this if you want to work with databases you may want to install some edition of SQL Server.
And you’ll probably encounter the .NET Framework, which is the technology that underpins a lot of Microsoft development stuff and helps link up various diverse technologies, development languages etc.
Note that Windows 7 or later is recommended for all this, even if not necessarily absolutely critical – and, as with all development software, plenty of RAM (my PCs have 6GB) and plenty of hard disc space are recommended.
For fancy graphics you’ll also need XNA Game Studio 4. XNA technology runs on Xbox consoles and Windows Phone 7 as well as on PCs. As a humorous aside, note that there are some people who claim XNA stands for "XNA is Not Acronymed". Microsoft say XNA doesn't stand for anything. Microsoft XNA Game Studio 4
Note that if you have a “.ac.uk” email address (or provide other accepted academic credentials) you can probably register at Microsoft’s Dreamspark site and get the “Pro” editions of this (and other) software [for non-commercial use only!] for free. Microsoft DreamSpark
For loading ISO disc images (which is what you get with some of the downloads), a tool like MagicDisc is helpful – or use Nero or any other CD/DVD burning software to burn the images to disc. Magic Disc
If you want to develop web sites, Microsoft’s web server is called Internet Information Server (IIS) – and ASP.NET is the web server extension that links IIS to the .NET Framework (and hence to development in .NET languages like C#) – there are plenty of (relatively) cheap web hosting companies that offer packages including IIS / ASP.NET / SQL Server and lots more – this is the one I use. Fast2Host
This is very versatile and quite powerful. As well as building the robots in the kit, you can design your own, with motors, lights and various sensors. Programming the robot can be very simple or as complex as you want it it with Lego's own easy to use graphical software or add-ons to Microsoft Visual Studio. Simple programs get stored and run on the Lego Minstorms NXT brick itself. For more complex things you can communicate with a PC while it is running and have a program on the PC control the robot. The robot connects to a PC via USB or Bluetooth. You'll probably want the 8547 kit (or the 9797 kit for education) to start with (unless Lego have come up with a newer version) - note that the Lego online shop is unlikely to be the cheapest place to buy it (unless you can get a special price for schools / academic institutions). Lego Mindstorms
For extra parts / spares, consider hunting on eBay . . .
For more advanced programming in C# using Visual Studio, download the .Net library from MindSqualls . . .
Note also that there is a new Mindstorms EV3 generation of products due out in 2013.
3D graphical programming - similar in concept to Scratch but maybe a bit more advanced. Alice
Graphical programming from Microsoft for PC and XBox. Kodu Game Lab
Tools for learning to programm in Java on Windows, Mac or Linux. Greenfoot
Software for app creation for mobiles from MIT. App Inventor
An alternative to PIC programming. Arduino
A simple robot that works with Raspberry Pi, Arduino - and Shrimp - processors. ShrimpBot
A grass roots organisation that aims to promote the teaching of Computing at school. Computing at School
A magazine (online and print) with lots of stuff about computing and its applications. Created with the aim of sharing the authors' passion about all things to do with Computer Science and published by Queen Mary University, London. CS4FN - Computing Science for Fun
A network of volunteers to run coding clubs in schools. Code Club
Software to learn programming in Ruby. Hackety Hack
A network of software developers and designers aged 18 and under. Young Rewired State
A wide range of devlopment boards based on PIC microcontrollers from MikroElectronika. MikroElectronika - EasyPIC
*** WARNING *** Do *** NOT *** confuse this with easypicDOTcom It is *** STRONGLY *** suggested that you block access to easypicDOTcom And do *** NOT *** use Google to search for EasyPIC
A JavaScript framework, rapidly becoming the de facto standard for simplifying programming in JavaScript, including providing lots of cool effects and solving a lot of the cross-platform web browser compatibility issues. Also think about using JQuery UI. JQuery
A language that extends JavaScript to make it a lot more friendly - and plugs into Visual Studio 2012 to give developers a much smoother development experience. Works with JQuery, but remember to include the jquery.d.ts TypeScript definitions file. You may also want to install the Web Essentials Visual Studio extension. TypeScript
Any ideas? Thoughts? Comments? Suggestions?
Found something useful that isn't mentioned here?
Any questions or difficulties?
Or after any further information?
Then email me at Info@CodingIsFun.co.uk
CodingIsFun™ originated with a series of sessions run outside normal school time in a primary school club, with small groups of children aged 8 to 11 (though CodingIsFun™ is just as much about teenagers and students as it is about younger children), aimed at giving them a broad flavour of what computing is about.
The emphasis was on having fun, getting them involved and variety rather than a systematic effort to turn them into programmers.
It certainly felt ambitious, but none of the pupils dropped out - the club was entirely voluntary, with no compulsion to attend - and the feedback was very positive.
And for the record (for anyone who might expect otherwise), it wasn't just boys - there were plenty of girls and they were just as good as the boys - but then it was a woman, Ada Lovelace, who arguably wrote the first ever computer programme!
Quite a lot!
I'm now running these sessions in 6 local primary schools - and developing ideas for other sessions. I'm involved with Royal Institution Masterclasses I'll be starting a series of sessions in a local secondary school as part of their lower sixth enrichment programme. I'm getting involved with staff at some local schools to introduce computing to them - especially in the context of Computing in the new National Curriculum from September 2014. And extending that to work with the Local Education Authority's Central Enfield City Learning Centre.
So things are quite busy
The simple answer is wherever it needs to to help get youngsters enthused about computing and programming.
It is (and probably always will be) a work in progress!
For one thing, computing doesn't stand still.
For another, there are lots of other people creating resources and tools and a major part of the aim of CodingIsFun™ is to help you find them.
CodingIsFun™ web site and content Copyright © TenScope Limited 2012, 2013, all rights reserved
Company registration no. : 06656008
Registered office : Suite F3 Sunley House, Olds Approach, Watford, England, WD18 9TB, United Kingdom
Contact Email : Info@CodingIsFun.co.uk
Use of this web site is subject to these Terms and Conditions and this Privacy Policy
JQuery is used under the terms of the MIT License. For further details, see http://jquery.com
Usage of code from (or based on code from) the following sources is also acknowledged: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf
Use of relevant web sites and resources drawn from them is subject to the relevant terms and conditions specified on such web sites, including copyright and recognition of relevant trademarks.