Asee peer logo

Cementing Abstraction With A Concrete Application: A Focused Use Of Robotics In Cs1

Download Paper |

Conference

2009 Annual Conference & Exposition

Location

Austin, Texas

Publication Date

June 14, 2009

Start Date

June 14, 2009

End Date

June 17, 2009

ISSN

2153-5965

Conference Session

Robots in Education

Tagged Division

Computers in Education

Page Count

14

Page Numbers

14.309.1 - 14.309.14

Permanent URL

https://peer.asee.org/4847

Download Count

51

Request a correction

Paper Authors

author page

Alexander Mentis United States Military Academy

author page

Charles Reynolds United States Military Academy

author page

Donald Abbott-McCune United States Military Academy

author page

Benjamin Ring United States Military Academy

Download Paper |

Abstract
NOTE: The first page of text has been automatically extracted and included below in lieu of an abstract

Cementing Abstraction with a Concrete Application: A Focused Use of Robots in CS1

Abstract

Teaching abstraction, modularity, and encapsulation, as well as the essential skill of reading, understanding, and using code generated by other programmers is important in an introductory programming course (hereafter referred to as CS1). A problem often encountered, however, is that the details of the underlying code hidden by good and interesting abstractions are often too complex to be used to teach beginning programmers to read and understand code written by others. This paper introduces an easy-to-use Ada wrapper package for the iRobot® Create platform’s Open Interface specification that is useful for illustrating the topics above, but it is implemented with code that is also relatively easy for beginning programmers to read. The accessibility of the underlying code further allows for its easy use in exploring more advanced concepts in follow-on CS and computer engineering courses. We believe our package and our approach toward its use support the successes other educators have had in integrating robotics into their curricula and overcome some of the difficulties that have been encountered.

1. Introduction

The motivation to create a wrapper for the iRobot® Create’s serial command Open Interface specification initially came from a desire to improve the way we teach abstraction, modularity, and encapsulation in our CS1 curriculum. In addition to the treatment we give to those topics during normal lecture hours, our students also participate in a two-hour lab, with a graded take- home portion, in which they are expected to use an instructor-provided package to solve a problem. Our CS1 course assumes no prior programming knowledge other than a broadly- scoped information technology course taken by all our freshmen. The CS1 course is taught using Ada, so that is the language we used for our wrapper package. Ada was convenient to use for that reason, but we also believe the use of Ada lowers some of the barriers to using robots in the curriculum that others have encountered, and we discuss this later. Because of the way Ada provides encapsulation, Ada packages consist of two files: a specification, which describes the package’s API; and a body, which contains the package’s implementation.

Previously, the lab on packages typically consisted of a block of instruction focusing on the contents of the specification and how to use it, followed by a brief exposure of the “scary” implementation the API was altruistically hiding. The capabilities the package usually provided, while useful, were admittedly less than compelling, and the implementation was rarely, if ever, looked at again. The benefits of introducing our Open Interface wrapper package into this lab are three-fold: it serves to present a context for the discussion of abstraction and encapsulation that is more interesting to our students, implementing algorithms to control robots reinforces numerous basic programming and engineering skills appropriate to cover in CS1, and, most notably, the hidden details of the implementation are still simple enough to be used later in the CS1 course, or elsewhere in the curriculum, to illustrate more advanced programming and hardware concepts. It is this last point that we feel has been largely overlooked in other robotics integrations.

Mentis, A., & Reynolds, C., & Abbott-McCune, D., & Ring, B. (2009, June), Cementing Abstraction With A Concrete Application: A Focused Use Of Robotics In Cs1 Paper presented at 2009 Annual Conference & Exposition, Austin, Texas. https://peer.asee.org/4847

ASEE holds the copyright on this document. It may be read by the public free of charge. Authors may archive their work on personal websites or in institutional repositories with the following citation: © 2009 American Society for Engineering Education. Other scholars may excerpt or quote from these materials with the same citation. When excerpting or quoting from Conference Proceedings, authors should, in addition to noting the ASEE copyright, list all the original authors and their institutions and name the host city of the conference. - Last updated April 1, 2015