This project was designed to support Sixth Form students studying for either the
OCR A-level Computer Science (H446) or AQA A-level Computer Science (7517), specifically the non examinable programming element.
In order to prepare a group of Lower Sixth CS students for the programming component that they will complete next year, we asked them to work in pairs on the sections of the project described below.
The idea was to give them: an insight into the work of software development teams, a feel for the complexity of code required by AQA and OCR, and the opportunity to create code for and work on a project that meets the complexity requirements necessary for A-level that also included hardware elements.
The Quiz project can be used to cover many aspects of the A-Level courses and not just the project element. The following tables state which aspects of the specifications can be addressed the use of this Quiz
From Unit 1
1.1.2 Types of processor
1.1.3 Input, output and storage
1.2.2 Applications Generation
1.2.3 Software Development
1.2.4 Types of Programming Language
1.3.4 Web Technologies
From Unit 2
2.1.2 Thinking ahead
2.1.3 Thinking procedurally
2.1.4 Thinking logically
2.1.5 Thinking concurrently
2.2.1 Programming techniques
2.2.2 Computational methods
Fundamentals of programming
Fundamentals of algorithms
Theory of computation
Fundamentals of computer systems
Fundamentals of communication and networking
Systematic approach to problem solving
This is a fully functional quiz game, complete with buttons for players, lights showing the current status, and a scoring system.
The game will also query an online database to provide a large number of questions that can be asked during the course of the game.
A block diagram showing the separate elements of the game is shown below.
The Quiz has two teams each of four competitors and a ninth person acting as Question Master. Each competitor has a button to press and a light in front of them. Two large panels show the team scores.
When the game starts all of the individual lights are on, making a total of 8 lit lamps. The easiest way to understand how the game operates is go through the slides in the User Interface section that follows (or watch the video – press the + on the bar below).
The game is controlled by a screen for use by the Question Master, who is likely to be non technical. A key requirement then is that the system must manage all of the various elements: lighting, scoring etc. All the Question Master should have to do is read the question, wait for the answer and then use the ✓ and ✘ buttons (Ideally the screen will be on a touch sensitive device so that s/he can just touch the buttons). The game should then automatically calculate the scores and control the scoring and lighting subsystems.
In addition, it is inevitable that at some point the Question Master will press the wrong button, so an ‘Undo’ function needs to be incorporated.
The slide sequence below show the Question Master’s screen. It is intended that the neccessary code to create the screen will run on a Raspberry Pi.
Button & Lighting System
The Button & Lighting System controls what happens as each question is asked and answered. It controls 8 output signals (2 x 4 individual lights) and receives notifications from 8 input push buttons. To reduce the number of physical boxes, each player’s lamp and button is combined into one unit.
The scoring system is described in the Quiz Sequence and User Interface sections above. The scores are presented to the players and to the audience using large 250mm high 7 segment displays. These displays are driven by an Arduino controller. Two sets of code are required, one running on the Arduino to control the 7 segment displays and the other for the Raspberry Pi to transmit score codes to the Arduino.
The question database is OPENTRIVIA, an open source, free to use, database of trivia questions. To quote: ” The Open Trivia Database provides a completely free JSON API for use in programming projects. Use of this API does not require a API Key, just generate the URL below use it in your own application to retrieve trivia questions.”
The box below shows a live response generated by the open trivia database. The data in the box changes every few seconds.
The hardware arrangement is shown below. There are eight combined button/lamp player boxes, two Team Boxes and a Question Master console (Control Box C).
The two data signals from the Control Box C to the Team Box A are combined into one multicore cable (a 25 Way D cable). A similar cable is used for the A to B box connection.
The two team boxes are constructed of 9mm MDF. Build instructions are at Instructables.com