Integration of C Programming and Iot in A Raspberry Pi Controlled Robot Car in A Freshmen Sophomore Engineering Core Class
Integration of C Programming and Iot in A Raspberry Pi Controlled Robot Car in A Freshmen Sophomore Engineering Core Class
Abstract
Project-based learning (PBL) is an important component of active learning techniques, and it helps
students integrate their knowledge and skills in a hands-on experience [1, 2]. This paper studies
PBL in the context of a freshman/sophomore engineering core class. The project combines
hardware and software components and it is aimed at making programming more relatable to
every-day applications for students. Student surveys have been used to quantitatively evaluate the
effectiveness of the project on different learning objectives. Our studies demonstrate that PBL
facilitates student learning both for basic concepts and for real world applications.
I. Introduction
One of the methods to engage students in the classroom and expose them to a wider range of
educational goals such as design and teamwork is PBL in groups. This active learning technique
keeps students engaged during the class since it has a strong hands-on component. It also teaches
them how the engineering design process is implemented, and how to work well together.
It is also important in engineering and programming courses to expose students to the topics most
relevant in industry today [4]. As an example, Internet of Things (IoT) is a rapidly expanding topic
in Electrical and Computer Engineering, and as such, it is important to teach students about it early
on in their education; as it may help them in choosing their educational and career path.
The first half of the semester is dedicated to teaching students about basics of programming and
operation of sensors and actuators. The second half of the semester is dedicated to a group project
which is an essential element of this course. Students complete the project in groups of 3 or 4, and
the instructor guides them through the basics of teamwork. The project consists of a Robot Car
and the parts are obtained from Osoyoo Company (Fig. 1) [5]. The car is controlled through
Raspberry Pi 3B+. The goal of the project is to use the required sensors and actuators and program
the car in order to accomplish the following tasks upon execution of the program:
1. The desired speed of the car is taken from the user in m/s unit. Once the user enters the
speed, the car starts moving.
2. The car follows a 2.5cm-wide black line on a white surface.
3. If there is an obstacle on the way, the car stops, goes around the obstacle, and continues its
path.
In addition to these features, students should be able to control the car manually from their phone
or their computer.
III. A. Hardware
Servo motor
DC motors
Ultrasonic sensor
(a)
(b)
Figure 2: Hardware components of the robot car project: (a) line follower sensors (red), ultrasonic sensor (green),
DC motors (blue), servo motor (purple), and camera (yellow) (b) Raspberry Pi 3B+.
III. B. Software
The programming language for this project is C. Students are instructed to write separate functions
for each project outcome as listed in section III. A. There are some additional elements in the
program as well, such as a code to control the servo motor on which the camera is mounted.
Students turn in a final report for the project which contains the following sections: design process,
challenges, and lessons for future. The C code for the project is attached to the report as an
appendix.
In addition to the final report, students are required to demonstrate the project outcomes as a group
in front of the instructor. A Demo Day is scheduled and the instructor examines the Robot Car
built by each group and verifies that the required project outcomes have been met.
V. Assessment Methods
A student questionnaire was designed to quantitatively assess the effectiveness of the project in
achieving the following goals:
The questionnaire captures students’ perception of their knowledge and skills in different areas.
For goal (a), students were instructed to assess their programming skills in a comparative manner
before and after completion of the course project. The rating options were as follows:
1: Excellent
2: Good
3: Average
4: Poor
5: Terrible
For goals (b) – (d), students were instructed to assess the effectiveness of the course project in
achieving the goals using the following rating:
1: Extremely effective
2: Very effective
3: Moderately effective
4: Slightly effective
5: Not effective at all
The first goal of the project (goal (a)) was to improve C programming skills in students. The
corresponding question was designed as a comparative study, looking at the skills before and after
the course project. The results are shown in Fig. 4 (rating details explained in section V). It can be
seen that there is an improvement in students’ programming skills after completing the course
project. The average student rating has increased from 2.67 before the project to 3.85 after the
project.
25
Before Course Project
After Course Project
20
Number of Students
15
10
0
1 2 3 4 5
Skill Level
Figure 4: A summary of student survey results on C programming skills before and after the course project.
The average ratings for effectiveness of the course project in achieving goals (b) – (d) is
demonstrated in Fig. 5 (rating details explained in section V). These results suggest that for goals
(b) and (c), demonstrating software-hardware connection and everyday applications, the project
has been effective (average ratings 3.88 and 3.85, respectively). However, for goal (d),
demonstrating the concept and applications of IoT, the project has not been as effective (average
rating 3.23). We believe this can be improved by allocating more time to cover the basic concept
of IoT and how it was developed to improve student understanding.
5
1
Software-Hardware Everyday IoT
Connection Applications
Project Goals
Figure 5: A summary of student survey results on effectiveness of course project in achieving learning objectives.
The results of the self-evaluating survey overall demonstrate that the project has been effective in
improving students’ programming skills, as well as showing them the software-hardware
connection and real world applications of programming in practice. The effectiveness of the
project in introducing IoT to students can be improved by dedicating more time to this topic and
covering more background and implementation methods in the field of IoT. In addition, in future
studies we plan to utilize other quantification methods in addition to student surveys such as exam
grades and project grades. These will create a more comprehensive measure of the learning
benefits of PBL in general and the Robot Car project in particular.
References