Subscribe to our Erlang Factory newsletter to receive the latest updates and news

Hands on Hardware Fun with the Raspberry Pi using Erlang

an image

Target Audience: Engineers and programmers interested in designing the next generation of connected embedded systems.
Prerequisites: Basic understanding of Linux, hardware architectures and embedded systems. Some experience with C and Erlang would be useful but not required.
This tutorial will provide an overview of:
  • Current tools and methodologies employed in embedded systems
  • Embedded Linux and the ecosystem around it
  • Hardware drivers and interfacing
  • Erlang 101, focusing on features that are relevant to managing hardware
  • Erlang Embedded framework, a new proposal for architecting embedded systems
Duration: One day.
Registration: 08:30 on 20 March 2013.
Description:  While not a new concept, Embedded Linux is becoming more and more popular with the barriers for entry being lowered by projects such as the Raspberry Pi.

In this hands on tutorial we will design an Erlang powered embedded sensor node, running on the Raspberry Pi. We will take you through the steps required to build and deploy the Linux image, deal with hardware interfacing and backend connectivity.

Course Contents:

Module 1: Embedded Linux
In this module we will look at the elements of an Embedded Linux system, such as:
  • Cross compilers and build environments
  • The Kernel and the root file system
  • Bootloaders
We will also look at debugging, connectivity and deployment issues.

Exercise 1: Board bring up
We will build and deploy an image to the Raspberry Pi board using the Linux VM provided and hook up the target system to our computer for debugging.

Module 2: Interfacing Hardware
Embedded devices generally consist of more than just the processor and as such we need to interface our applications processor to external chips/sensors/peripherals. This module looks at:
  • Different kinds of embedded protocols used to interface things together
  • How these protocols are utilised in hardware
  • Memory mapped peripherals and interfaces
  • Linux kernel support for common protocols

Exercise 2: Blinkenlights!
We will get some LEDs blinking using both the kernel abstractions and memory mapped bit twiddling.

Module 3: Erlang 101
This module introduces Erlang the language and the ecosystem of tools. We will cover the basics of Erlang focusing on features that are particularly relevant to Embedded Systems such as the concurrency, supervision hierarchies, external interfaces and hot-code reloading.

Exercise 3: Erlang Exercises
Some introductory exercises about Erlang.

Module 4: Erlang Embedded Framework
We think Erlang is a great fit for the new generation of Embedded Systems and we present the Erlang Embedded framework to tackle the common challenges we face today with these kind of systems. This module introduces our work and looks at:
The relevance and use of Erlang in Embedded Systems
System granularity and fail-safe supervision hierarchies
The mapping between the hardware world and Erlang system

Exercise 4: Designing the Sensor Node
We will start this set of exercises with a few tasks utilising the hardware demo board and then put together an architecture for our sensor node.