Raspberry Pi

 Home / MG2I-C0109
Raspberry Pi

The unit will guide learners through the basics of common system architectures, Operating Systems (OS) management, I/O interfaces and control. Learners will use the scripting language concepts learned in the ‘Programming in Python’ unit and as a consequence should be able to operate effectively at more than a basic level of competence before commencing this unit.

An introduction is given to the embedded system covering its major hardware components, installation of the Operating System (OS) and basic configurations.

Following these basics, an introduction to scripting commands such as but not limited to: accessing files, processes and permissions will be covered with a particular focus on administration of the Operating System (OS) with command line.

Scripting language specific features are also revisited from the unit ‘Fundamentals of Scripting’, including the basic constructs, functions and modules. A number of practical tasks can be associated with this module, including programming digital input/ output, blinking LED, face detection and scheduling commands with cron.

During this unit, learners will be able to create small projects such as a cron lamp timer, simple soundboard and photobooth.

  1. 1.   Illustrate and develop the fundamentals components of an embedded system.

1.1. Unit Introduction.

1.1.1.  Aims.

1.1.2.  Learning Outcomes.

1.1.3.  Agenda.

1.1.4.  Assignment for and of Learning.

1.1.5.  Resources.


1.2. Embedded System Hardware.

1.2.1.  What is an Embed System.

1.2.2.  History of Embedded System.

1.2.3.  Things you can do with an Embed System.(1.3)

1.2.4.  Hardware Tour of an Embedded System.(1.1)

1.2.5.  Peripherals.


1.3. Hardware/ Software Requirements. (2.1/ 2.2)

1.3.1.  Hardware Requirements for installing an Embedded OS.

1.3.2.  Software Requirements for installing an Embedded OS.


1.4. Setting up the Hardware. (2.3)

1.4.1.  TV/ LED monitor with HDMI cable

1.4.2.  Keyboard/ Mouse

1.4.3.  Local or Wi-Fi connectivity

1.4.4.  SD- Card

1.4.5.  Power Supply.


1.5. Setting up the Software. (2.4)

1.5.1.  Flashing/ Writing the SD card.

1.5.2.  Booting Options.

1.5.3.  Viewing System Information.

1.5.4.  Partition Management.

1.5.5.  Installing the OS.

1.5.6.  Basic Commands for: (2.5)      Booting      Login Credentials      Restart      Shut Down

1.5.7.  Troubleshooting.

1.5.8.  Taking an Image and Recovery.


  1. 2.   Produce and describe a simple embedded system proposal for a specific use.

2.1. Getting Started.

2.1.1.  Navigation through the Terminal.

2.1.2.  Using the Command Line.      Files, Folders and FileSystem.      Processes.      Sudo and Permissions      Networking.      Setting the Date and Time.      Installing/uninstalling, updating software.

2.2. Formulate an outline project specification

2.2.1.  Aims and objectives

2.2.2.  Background research

2.2.3.  List of Hardware and Software

2.2.4.  Project overview

2.2.5.  Work Plan

  1. 3.   Prepare and configure hardware and software to manage an embedded system.

3.1. Variables, Expressions and Statements.

3.1.1.  Values and Types.

3.1.2.  Variables.

3.1.3.  Variable Names and Keywords.

3.1.4.  Operators and Operands.

3.1.5.  Expressions and Statements.

3.1.6.  Order of Operations.

3.1.7.  String Operations.

3.1.8.  Debugging.

3.1.9.  Programming Lexicon.


3.2. Conditionals.

3.2.1.  Relations.

3.2.2.  Relational Operators.

3.2.3.  Logic Operator.

3.2.4.  NOT Gate.

3.2.5.  AND Gate.

3.2.6.  OR Gate.

3.2.7.  Conditional Execution.

3.2.8.  Alternative Execution.

3.2.9.  Chained Conditionals.

3.2.10.  Nested conditions.

3.2.11.  Programming Lexicon.


3.3. Iteration.

3.3.1.  Loop Types.

3.3.2.  While Loop.

3.3.3.  For Loop.

3.3.4.  Loop Control Statements.

3.3.5.  Break Statement.

3.3.6.  Continue Statement.

3.3.7.  Pass Statements.

3.3.8.  More Loops.

3.3.9.  Programming Lexicon.


3.4. Functions.

3.4.1.  Function Calls.

3.4.2.  Type Conversion Functions.

3.4.3.  Input Function.

3.4.4.  Adding New Functions.

3.4.5.  Parameters and Arguments.

3.4.6.  Variables and Parameters are Local.

3.4.7.  Fruitful and Void Functions.

3.4.8.  Debugging.

3.4.9.  Return Value.

3.4.10.  Programming Lexicon.

3.5. Modules.

3.5.1.  Import Command.

3.5.2.  Random Module.

3.5.3.  Time Module.

3.5.4.  Math Module.

3.5.5.  Web Browser Module.

3.5.6.  Tkinter Module.

3.5.7.  Writing Modules.

3.5.8.  RPI.GPIO

3.5.9.  SimpleCV

3.5.10.  Programming Lexicon.

  1. 4.   Manipulate and develop a simple embedded system solution for a specific use.

4.1. Hardware Interfacing.

4.1.1.  Breadboard.

4.1.2.  Male to Female Jumper Wires.

4.1.3.  Male to Male Jumper Wires.

4.1.4.  LED.

4.1.5.  Resistor.

4.1.6.  Capacitor.

4.1.7.  Reading a Circuit Diagram.

4.1.8.  GPIO Pin Connections.

4.1.9.  Direct Connection to GPIO.


4.2. Basic Input and Output.

4.2.1.  Using Inputs and Outputs.      Digital Output: Lighting up an LED.      Digital Input: Reading a Button.

4.2.2.  Project: Cron Lamp Timer.      Scripting Commands.      Connecting an LED.      Scheduling Commands with cron.


4.3. Programming I/O.

4.3.1.  Installing and Testing GPIO.

4.3.2.  Blinking a LED.

4.3.3.  Reading a Button.


4.4. Working with Webcams.

4.4.1.  Testing Webcams.

4.4.2.  Installing and Testing SimpleCV.

4.4.3.  Displaying an Image.

4.4.4.  Accessing the Webcam.

4.4.5.  Face Detection.

Project: Photobooth.


This unit contains an essential mix of theory and practical based activities. To ensure learners have a strong basis in the fundamentals of the topic it is vital that each individual topic introduced is backed up with practical examples and tasks to secure Knowledge and understanding is taking place. As such it is assumed that the appropriate tools are available to learner at lecturer time or in associate lab time. It would also be beneficial for learners to have access to programming tools either at home or at the institute. As such the development environment should be chosen wisely. Where the appropriate individual topics should be introduced in relation to previous outcomes covered in the unit ‘Fundamentals of Scripting’ in order to build and constant continuity between the two units.

At this level it is essential that learners be exposed to lectures, discussions and demonstrations during the contact hours to enable them to gain an in-depth knowledge and understanding of scripting in relation to an embedded system. Practice should be project-based whereby learners use a scripting language to demonstrate the use of simple embedded system I/O and sensor peripherals and to manipulate and develop a simple embedded system solution for a specific use.



General computer skills. Has prior knowledge of Python or other programming languages.

Entry Requirements

Recommended to follow the Programming in Python course first unless the candidate has already a programming background.

js files