0% found this document useful (0 votes)
23 views9 pages

Transition To Object Oriented Programming Oop An Innovative and Hands On Introduction To Linux Oop in C and Arduinos Using Emoro

Programación en Arduino OOP
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
23 views9 pages

Transition To Object Oriented Programming Oop An Innovative and Hands On Introduction To Linux Oop in C and Arduinos Using Emoro

Programación en Arduino OOP
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 9

Transition to Object Oriented-Programming (TOOP):

An Innovative and Hands-On Introduction to Linux,


OOP, and Arduinos using EMoRo
Joseph Benin and Avinash Srinivasan

Electrical Engineering & Cyber Systems


United States Coast Guard Academy
New London, CT 06320
[joseph.t.benin; avinash.srinivasan]@ uscga.edu

March 25, 2019

Abstract
The United States Coast Guard Academy established a Core Curriculum Review
Task Force in 2011 that submitted recommendations with necessary changes to the
Academy’s core-curriculum. A key recommendation of the Task Force included adding
a freshman year course on computer-based problem solving that would cover modeling
problems and using Microsoft Excel and MathWorks MATLAB. However, curriculum
overlap within Electrical Engineering and Cyber Systems’ sophomore year Introduction
to Computer Programming covering MATLAB and C++ presented the Faculty with the
challenge of adapting this course while retaining C++ content.
Consequently, using ABET best practices as its guiding principle, a second Program
Review was held in the summer of 2017 where it was decided that a 2.0 credit course
that included both Linux and C++ would be the best option. This paper presents in
detail the conception, design and implementation of a 2.0 credit, highly-interactive
and hands-on course titled Transition to Object Oriented Programming (TOOP). The
paper specifically discusses the adoption of a home-grown Training Wheels platform
within the Ubuntu operating system running as a virtual machine, C++ programming
with Eclipse integrated development environment (also within Ubuntu), and finally
the Arduino at Heart EMoRo robot.

1 Introduction
Education is a constantly evolving, ever-grounded process of systematic instruction that
transmits information for the reception of students. In the forming of constructive minds
and hearts. As advances in knowledge occur, both the methods and content of education

1
must adapt to enable the best intellectual development and character building. While Charles
Babbage designed the first mechanical computer as early as 1822 [1], the digital computers
are relatively new and have been with us since the 1930s [2]. In recent years, computer
programming has shifted from being a skill for an elect few computer scientists to entering
the main stream of education [3].
At the United States Coast Guard Academy (USCGA), learning computer programming
has been an integral part of the Electrical Engineering curriculum for decades. While initially
focused on hardware-friendly languages like C and C++, this was later expanded to include
MATLAB and C#. In keeping with the principle of continuous improvement and providing our
students with the best learning experience possible, a Core Curriculum Review was initiated
in 2011. This group, formally named the Core Curriculum Review Task Force, submitted
their recommendations with necessary changes to USCGA core-curriculum.
A key recommendation of the Task Force included adding a freshman year course on
computer-based problem solving. Various departments began to collaborate on what this
course should cover and which language, if any, should be included. Ultimately the Electri-
cal Engineering and Cyber Systems Section took the lead for the STEM majors and built
the Introduction to Computing course that covers modeling problems and using Microsoft
Excel [4] and MathWorks MATLAB [5].
As a result of this addition to the core-curriculum, the Program of Study within the
Electrical Engineering and Cyber Systems majors had to adjust given the new curricula
overlap within their sophomore year Introduction to Computer Programming course that
covered MATLAB and C++. This presented the Faculty with an exciting opportunity and
challenge in adapting this course while retaining C++ content. Consequently, using ABET
best practices as its guiding principle, a second Program Review was held in the summer of
2017. During this series of meetings, it was decided that the C++ content was still important
to the program and should be retained.
In addition, some faculty expressed a strong desire for our students to be exposed to the
Linux operating system (OS). In the end it was decided that a 2.0 credit course would be
the best option. Thus was born the highly-interactive and hands-on course titled Transition
to Object Oriented Programming (TOOP).

1.1 Roadmap
The remainder of this paper is organized as follows. Course overview of TOOP is discussed in
Section 2. Section 2.1 discusses the Linux portion. The C++ portion is covered in Section 2.2.
The integration of both of these subjects through the use of the EMoRo robot is discussed in
Section 3. Lessons learned are presented in Section 4 and the paper concludes with Section 5.

2
2 Course Overview
The official USCGA catalog entry for this course is as follows:

Building upon the procedural and high level programming introduced in I2C,
this course launches into the world of Object Oriented Programming and
Design using the lower level language of C++. Key concepts of OOP are
covered including classes, properties, methods, constructors, destructors,
overloading, and inheritance. This treatment is conducted within the Linux
operating system to expand the students’ exposure to another operating system
and in preparation for further study of Operating Systems, Computer & Network
Security, and potential use in Capstone Projects.
It is a required course for all Electrical Engineering and Cyber Systems students and open
to any other student who has successfully completed the new Introduction to Computing
course. The TOOP course is designed to meet twice a week. In its first offering, it had
28 students and two instructors which reflects the high student:teacher ratio reflective of
USCGA and the hands-on nature of this course. Thus is was somewhat of a hybrid lec-
ture/lab (active learning) configuration. The first 15 − 20 minutes were often devoted to a
brief lecture to introduce that day’s topic and then the students were provided an in-class
exercise to complete for the remainder of the period.
Once completed, students were encouraged to help others but were able to leave if they
needed/chose to. The students were required to bring their own laptops to class each meeting
(fully charged). A preference for open-source resources existed as outlined below. At the
end of each class, students were required to submit evidence of their completion of each
in-class exercise depending on the assignment (usually a screen shot or code file) and they
were assessed on the completion of the work assigned.
In addition there were quizzes (Linux), homework assignments (C++), and a graded
project (Arduino) which were used for assessment purposed. Late work was accepted within
24 hours for a 15% penalty and 48 hours with a 35% penalty (work was not accepted after
that unless there were emergent circumstances).

2.1 Learning Ubuntu Linux: Training Wheels


At USCGA, we believe computing is best learned by seeing and doing. As a result, the TOOP
class begins with an overview of the history of Linux and the concept of virtualization along
with step-by-step instructions to install VMware Workstation Pro [6] and Ubuntu [7]. Ubuntu
was selected given its focus on ease of transition from other operating systems and its use by
USCGA’s Cyber Team. The Cyber Team is a multidisciplinary competitive team composed
of cadets across different departments and sections at USCGA, with a cadat captain, faculty
lead coach, and several faculty mentors. The team competes national and international
events ranging from hacking competitions like HACKTHEMACHINE [17] and NSA Cyber
Exercise [18] to cyber policy challenges [19].
Finally, once installed, students then completed 11 lessons using Training Wheels [8],
an open source application developed using JSON to provide an interactive, hands-on Linux

3
learning environment where the students’ commands are passed to the actual Ubuntu shell
with results then displayed. For a few years the Academy has been offering a one credit
course to introduce cadets to Linux. This effort resulted in the development of Training
Wheels in 2016 to allow students to learn Linux interactively. Students are introduced to
concepts, asked to perform some task (like show a directory or pipe the output of a grep
command to a file) and then provided guidance on how to successfully complete this if they
do not enter the correct text. While this is an excellent way to learn, the students are
also provided a comprehensive open source textbook to augment this learning entitled Linux
Fundamentals [8] was adopted for students to refer to as well. The topics covered during
these four classes are listed in Table 1.

Class Training Wheels Lessons Topics


1 None Virtualization, Installing VMware and Ubuntu
2 1-3 Linux History and Getting Started with Training Wheels
3 4-7 Linux Paths and Files
4 8 Working with Files in Linux
5 9-11 Linux Users, Ownership, and Permissions

Table 1: Linux Topics

2.2 Learning C++ using Eclipse


The next nine weeks followed a more traditional treatment of the C++ language. In order to
continue the students’ familiarity with Ubuntu, Eclipse [10] for Linux was selected as the
integrated development environment (IDE) for this portion of the course. This portion of
the course utilized an open source online tutorial [11] as the primary reference and had the
students complete an in-class exercise each day to reinforce the material and ensure their
understanding. In addition, individual effort homework assignments were assigned to assess
their progress and ability. The topics covered in this portion of the course are listed in
Table 2.

3 Programming the EMoRo Robot


The authors believe the most innovative portion of this course is the use of the EMoRo
robot [12] (which is an Arduino at Heart [13] product). This approach enabled to apply
within the same semester they first learned OOP with C++ towards something they could
tactilely experience.
The EMoRo 2560 board (pictured in Figure 2(a)) is an immensely capable device that
features 16 digital I/O (with LEDs), 8 analog input (or additional digital I/O), 8 servo motor,
and 8 digital I/O ports (no LED) built upon the ATmega 2560 microcontroller. Adding the
GLAM (Gyroscope, LCD, Accelerometer, Magnetometer) module (Figure 2(b)) provides
advanced capabilities when programming the robot.
To further enhance the students’ learning experience authors decided to hand out each
student team (two cadets each )the unassembled EMoRo (see figure 1(a)). Each team had

4
Class Topics
6 Eclipse in Ubuntu
7 Getting Started with Eclipse and Intro to Object Oriented Programming
8 Starting with C++
9 Operators, Expressions, Constants, and Data Types
10 Basic Input/Output (including File I/O)
11 Selection and Loops
12 Functions
13 Name Visibility
14 Arrays (including Character Sequences)
15 Pointers
16 Data Structures
17 Intro to Classes
18 More Classes
19 Special Class Members (Constructors and Destructor)
20 Friendship and Inheritance
21 Polymorphism, Type Conversions, and Preprocessor Directives

Table 2: C++Topics

(a) (b)

Figure 1: (a) EMoRo robot components. (b)An assembled EMoRo.

one week (week-22 in Table 3) to assemble the parts into a complete EMoRo ready to be
programmed (figure 1(b)) starting week-23 (Table 3).
By having the students actually build and code on an EMoRo robot, they received im-
mediate physical feedback on the accuracy of their programming and subtlety had them
designing classes and implementing methods learned earlier in the semester.
In order to build upon both the Ubuntu OS and Eclipse IDE, the Sloeber [14] IDE
was selected for this portion. Sloeber is a specially modified Eclipse IDE that includes

5
(a) (b)

Figure 2: (a) EMoRo processor board [14]. (b) EMoRo GLAM module [14].

built-in support for Arduino. By using this, students are able to develop their code in a
more “C++-like” fashion (including classes) beyond the typical setup() and loop() constructs
provided by the Arduino IDE [15, 16].
As shown in Table 3, the first six classes of this module are focused on learning Arduino
and some of the many components of the EMoRo, while the final two classes are devoted to
working on and completing the course’s final challenge (see Figure 3 and Appendix-1).

Class EMoRo Component Introduced Topics


22 None Getting Started with Sloeber
23 LCD Intro to Arduino and EMoRo
24 Buttons Commanding Your Robot
25 Motors Moving Your Robot
26 Gyroscopic Sensor Making Turns
27 Ultrasonic Sensor Collision Avoidance
28 None Challenge Build Time and Trials
29 None Final Challenge

Table 3: Arduino Topics

6
(a) (b)

Figure 3: (a) Student team initializing EMoRo. (b) Challenge path for EMoRo final demo.

4 Lessons Learned
While we are very proud of this course and the work that went into developing it, we recognize
that nothing is ever perfect and there is always room for improvement. At the end of the
semester students were asked to provide feedback on the course. We generally view average
scores less than 2.5 as requiring attention, scores between 2.5 and 3.5 as meeting objectives,
and any average score above 3.5 as exceeding objectives.
Based upon this feedback, the biggest area for us to improve upon is graded feedback.
We also believe the topic of Error Catching should be incorporated into the course. This
year the students worked in pairs with a single EMoRo robot (mostly due to the cost of these
robots). We think pair programming can be very helpful in learning, but ultimately it may
be more beneficial for each student to have his or her own robot. This may require identifying
a cheaper robot to make this financially sustainable but only if we are able to locate one
that has the same suite of I/O devices.

5 Conclusion
TOOP represents a great addition to the United States Coast Guard Academy catalog of
courses. Overall, the instructors really enjoyed this course and felt like most of the students
did too based upon written end of course feedback. For some, learning Linux was a challenge
(especially since the only other regular users of Linux right now are select Cyber Team
members and since upper-class students have not taken this course and generally unable to
offer assistance).
Training Wheels was a wonderful way for students to learn at their own pace and
customized to their own learning course. The C++ portion was predominately taught using

7
the tutorial on www.cplusplus.com which is an excellent site. Some examples and material
are more advanced than the class needs, but this was reflected in the lecture notes and slides
(and also provides motivated students the ability to deepen their knowledge). The EMoRo
Arduino robot was a huge success1 . The vast majority of students really enjoyed applying
and seeing what they learned translate into tangible results.

References
[1] Computer Hope, “When was the first computer invented?,” 13 November 2018. [On-
line]. Available: https://www.computerhope.com/issues/ch000984.htm. [Accessed 26
February 2019].

[2] R. McMahon, “Computer History Resources,” in ACM SIGITE, Newark, NJ, 2005.

[3] G. Galvin, “Some Say Computer Coding Is a Foreign Language,” 13 October 2016.
[Online]. Available: http://tinyurl.com/y5rm5khy. [Accessed 26 February 2019].

[4] Microsoft, “Excel,” [Online]. Available: https://products.office.com/en-us/excel.


[Accessed 26 February 2019].

[5] Mathworks, “Matlab,” [Online]. Available: https://www.mathworks.com/products/


matlab.html. [Accessed 26 February 2019].

[6] VMware, “Workstation Pro,” [Online]. Available: https://www.vmware.com/products/


workstation-pro.html. [Accessed 26 February 2019].

[7] Canonical, “Ubuntu,” [Online]. Available: https://www.ubuntu.com/. [Accessed 26


February 2019].

[8] J. Hammond, “Training Wheels,” GitHub, [Online]. Available: https://github.com/


JohnHammond/training_wheels-public. [Accessed 26 February 2019].

[9] P. Cobbaut, “Linux Training,” [Online]. Available: http://linux-training.be/


linuxfun.pdf. [Accessed 26 February 2019].

[10] Eclipse Foundation, “Eclipse IDE,” [Online]. Available: https://www.eclipse.org/


downloads/packages/. [Accessed 26 February 2019].

[11] The C++ Resources Network, [Online]. Available: http://www.cplusplus.com/doc/


tutorial/. [Accessed 26 February 2019].

[12] EMoRo Creative Learning, “EMoRo,” Inovatic ICT, [Online].


Available: http://www.emoro.eu/. [Accessed 26 February 2019].

[13] Arduino, “The Arduino AtHeart Program,” [Online]. Available: https://www.


arduino.cc/en/ArduinoAtHeart/Products\#program. [Accessed 26 February 2019].
1
Interested readers are encouraged to contact the authors.

8
[14] EMoRo, “EMoRo Robot Kit,” [Online]. Available: http://www.emoro.eu/content/
view/emoro-robot-kit/601. [Accessed 26 February 2019].

[15] J. Baeyens, “Where Arduino meets Eclipse,” [Online]. Available: http://eclipse.


baeyens.it/. [Accessed 26 February 2019].

[16] Arduino, “Download the Arduino IDE,” [Online]. Available: https://www.arduino.


cc/en/main/software. [Accessed 26 February 2019].

[17] Atlantic Council, “Cyber 9/12 Strategy Challenge” [Online]. Available:


https://www.atlanticcouncil.org/programs/brent-scowcroft-center/
cyber-statecraft/cyber-9-12. [Accessed 24 March 2019].

[18] “HACKTHEMACHINE” [Online]. Available: https://www.hackthemachine.ai. [Ac-


cessed 24 March 2019].

[19] “NSA Cyber Exercise (NCX)” [Online]. Available: https://www.nsa.gov/


What-We-Do/Cybersecurity/NCX/. [Accessed 24 March 2019].

You might also like