Buying for a Team? Gift This Course
Wishlisted Wishlist

Please confirm that you want to add Introduction to C Programming for the Raspberry Pi to your Wishlist.

Add to Wishlist

Introduction to C Programming for the Raspberry Pi

Learn how to develop your practical Raspberry Pi projects using the C Language
4.3 (15 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
1,872 students enrolled
Last updated 1/2017
30-Day Money-Back Guarantee
  • 3 hours on-demand video
  • 5 Articles
  • 79 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Have a coupon?

This Course is about learning the fundamentals about the C language to get you started with making physical projects with the Raspberry Pi developed in C. 

This Course is for Hobbyists, people who want to make prototypes or are interested to make a carrier change.

Reasons for joining the course could be:

  • You don't like Python, the default language for the Raspberry Pi, and you are looking for an alternative language.
  • You're curios about the C language and think, it would be a fun way to learn C and make Raspberry Pi projects at the same time.
  • You have heard that the default Industry Language for embedded systems is C and want to know if this could be a carrier for you.

After this course, you'll know what Compiler you need and how to work with it from different working environments, like the command line, the IDE Geany and Netbeans and how to get everything to work.

You'll learn how to get electronic components to work with C. The projects we will do are independent from each other and can easy be customised or combined which each other for your own needs. 

All the examples are easy enough for beginners.

So, let's summarize what you will get from this course:

You will learn to get your development environment right, this goes from knowing what to use and installing to configuration.

Most of the time, I will code before your eyes, which will make it easy for you to understand how things are done.

The examples and the provided Source Code will give you confidence. 

You will also become familiar with using sensors or other electronic components to make physical projects that are developed in C.

Who is the target audience?
  • Everybody who is interested to make Raspberry Pi projects using the C Language
Students Who Viewed This Course Also Viewed
What Will I Learn?
Setting up the Development Environment for programming in C.
Develop Physical Raspberry Pi Projects developed in the C language.
View Curriculum
  • A Raspberry Pi and some electronic components are needed. A computer, like a PC with Windows or Linux or a Mac Computer.
  • Students should have some experience with making physical projects with one of the Raspberry Pi's. Some basic programming skills for example with Python.
Curriculum For This Course
Expand All 41 Lectures Collapse All 41 Lectures 03:13:29
3 Lectures 10:06

Get to know the instructor for this course and an overview of the course.

Preview 01:35

In this lesson, you'll learn what hardware is used in this course. 

Preview 01:08

In this lesson, you'll learn what Operation System and Software is used in this course.

Preview 07:23
Setting up the environment
3 Lectures 19:20

In this lesson, we will do the whole process from writing the code, compiling, running and debugging the program from the command line.

Working from the Command Line

In this lesson, we will use the IDE Geany to write, compile and debug the code and run the program.

The IDE Geany

In this lesson, we will start with the installation and configuration of the IDE Netbeans. We will connect Netbeans to the Raspberry Pi, write code, compile the code and run the program.

The IDE Netbeans

What do you need to make C programs that run on the Raspberry Pi?

Coding Environment
4 questions
Introduction to the C Language
15 Lectures 01:10:49

In this lesson, I will talk about what we are doing in this section.


In this lesson, we'll look at the building blocks of a C Program to answer the question, what are C Programs are made of.

The structure of a C source file

In this lesson, you'll learn how to write text on the screen and how to read user input from the keyboard.

Keyboard and screen

Which statement can print \n on the screen?

Formatted Print with \n
1 question

In this lesson, you'll learn, how to add comments to the Source Code.


In this lesson, you'll learn how to declare and use variables.


In this lesson, you'll learn, what different kind of mathematical operations are used in the C language.

Simple mathematical operations

#include <studio.h>

int main()


   int i = 100, j = 9, k;

   i =  i/10;

   k = i - j;

   printf("%d - %d = %d\n" , i, j, k);

   return 0;


What is the outcome of the following code example?
1 question

In this lesson, you'll learn, how to use the datatype char that is used for declaring characters and strings.

Characters & Strings

In this lesson, you'll learn, how to declare and use constants in your program.


In this lesson, you'll learn about the different types of arrays, how to declare and use them.


In this lesson, you'll get an overview over the different kind of conditions that are used in C.


In this lesson, we'll make a countdown program to demonstrate the advantage of the fflush() function.

Using fflush(stdout) from the stdio.h we are able to flush the named stream, stdout in this case. 

Preview 09:49

In this lesson, you'll learn, how pointers are declared and used in a C program.


In this lesson, we'll make use of pointers to declare files. You'll also learn, how to create, open, close, read and write to files.



int main ()
   FILE *fp;
   fp = fopen("source.txt", "r");
   return 0;
file() uses
1 question

In this lesson, you'll learn, how the system function can be used to call extern programs from your C program.

System commands - system calls

Learn how to write your own functions.

Write your own functions
Physical projects
17 Lectures 01:22:15

In this tutorial you'll learn how to setup the library wiringPi. The library is needed to get access to the GPIO pins on the Raspberry Pi.

Setting up the library WiringPi

In this lesson, we will use the library wiringPi to do our first physical project, the Blinking LED.

Blinking LED

Adding 2 Led's to the countdown program

We'll take the countdown program we did earlier as a starting point. This means that you need to load this code into your IDE to work from there.

Lab Exercise: Countdown with 2 LEDs

In this lesson, we will light up a LED after pressing a button.

Controlling a LED by a Button

In this lesson, we'll create a program that counts every time we press a button.

Lab exercise: People Counter with a Button

In this lesson, will will let the buzzer make a sound after pressing a button. (Door Bell)

Basic projects with a Buzzer

In this lesson, we will first test the tilt sensor with a LED, than replace the LED with a buzzer to make ourself a prototype of a bicycle alarm.

Tilt sensor project

In this lesson, we will read the humidity and temperature from the DHT11 sensor and print the value on the screen.

Reading from the DHT11 sensor

In this lesson, we will gradually increase and decrease the luminance of an LED with PWM (Pulse-width modulation) technology, which looks like breathing.  

Breathing LED - using PWM

In this lesson, we will take pictures with the RaspiCam using the system() function. The system() function let us use the pre-installed camera programs raspistill (picture taking) and raspivid (video taking).

Taking a picture with RaspiCam using system()

Add a text to the Source Code that prints on the screen 5 seconds before the camera starts to take (a) picture(s).


to pause 5 seconds, you can use:


Say Cheese!
1 question

The program takes only a picture after the Button has pressed.


Take the inspiration from the Source Code "Control LED by Button".

Add a Camera Button
1 question

In this lesson, we'll write a test program for the PIR sensor.

PIR sensor - Getting started

The LED goes on after the PIR sensor has been triggered.

In this lesson, we'll combine code from the PIR sensor getting started lessen and the adding a LED to it.

Make the code from the lesson "PIR sensor - Getting started" available in an editor or IDE, so that you can take this code as starting point.

Lab Exercise: PIR sensor with LED

Configuration of the I2C Interface. Project example: BMP180, Getting the Barometer sensor up and running.


Distance measurement

In this lesson, we'll write a program to measure the distance and print the result in cm and inch. This code is a very good base for all kind of projects where you wanna use an ultrasonic sensor.

Ultrasonic sensor - Getting started

Lab Exercise: People Counter with Ultrasonic

In this lesson, we'll will prepare the Linux system (Raspbian) to be able to send Emails. After that, we can send text emails, attached files or both.

Sending Emails from the Raspberry Pi

In this lesson, we'll setup a project with a Button and the Raspicam. 

The press of the Button (Door Bell) will trigger the camera to take a picture. After the picture has been taken, it will be send to a pre-defined Email address from out of our C Code.

Emails from the Door Bell
1 Lecture 00:02

In this summary, I will give you some recommendations for going further in C development.

Where to go from here
Bonus Lectures
2 Lectures 10:50

Installation of MonoDevelop on the Raspberry Pi

Installation and use of MonoDevelop

In this lesson, we'll take several Arduino example sketches and convert them into C code for the Raspberry Pi.

Converting Arduino Sketch into Raspberry Pi C Code
About the Instructor
4.3 Average rating
15 Reviews
1,872 Students
1 Course
System Development & System Design at eMaker Studio

As a former System- and Network Administrator at DaimlerChrysler R&D I had a close connection to hardware, network, Operation Systems and system development. Several years ago I took the next step and went into the embedded system development and IoT. My preferred prototyping platforms are Raspberry Pi and Arduino. I like development itself and to teach development skills.

Report Abuse