<<

Session T1D Based Introduction to

Hugh Smith California Polytechnic University, [email protected]

Abstract – We developed an Introduction to the classroom. The lab component of the course focused on course focused on embedded systems and . This building and programming the students’ robots. course is taken by first year and students. This course uses a STUDENTS number of hardware components including a Bluetooth This course consisted of Computer Engineering, board and IR sensors to with an Arduino Computer Science and Engineering students. The Microcontroller board to implement an autonomous course was taught in two sections of approximately 30 wheeled robot. This course consists of 3-hours of lecture students each. This course assumes no previous and 3-hours of lab per week. There were 7 programming experience for the incoming students. While assignments that allowed the student to learn about it is not intended as solely a programming course, a main programming and interfacing with the required component of the grade is the robotic . hardware. The course also had two projects. The first One of the main issues encountered by introductory to was to control the robot using a Bluetooth computing courses is the wide disparity in programming connections. The second project was to implement a line skills of the incoming freshmen. Based on a survey of the following program using an IR sensor. 63 students in the course 35% of the students identified as This course was taught using a flipped model having significant programming experience and 31% had with the traditional lecture material being presented little to no programming experience. Also, 40% of the using . Assessment of this material was performed students had worked on some type of robotics project or both on-line and in-class. The in-class “lecture” time competition during high school. focused on activities using the on-line material. While This disparity in skill sets is a known issue for the this was the first time we taught this course and our first computing majors. In our College of Engineering this experience using this flipped format, we are able to problem seems to be unique to the computing majors. Most provide some results from using this approach. other engineering majors do not have a significant component of the major introductory courses taught in a Index Terms – Arduino, Embedded Systems, Robotics, CS1. subset of high schools. We address the issue of skill set INTRODUCTION disparity later in this paper. California Polytechnic State University’s (Cal Poly) EMBEDDED SYSTEMS COURSE Computer Science and Computer Engineering programs The focus of this course was on embedded systems. The require a 4-unit Introduction to Computing course that course used an Arduino Uno Microcontroller board. The proceeds CS1 (intro to programming). This course is students programmed this board using the Arduino intended to introduce the students to the depth and breadth Integrated Development Environment (IDE). The students of the computing majors. The students have a choice purchased an $85 kit that included all of the hardware for between five different versions of this course including this course. This kit included a two wheel robot, an Uno (), Music, Electronic Art, and . The version we implemented focused on embedded systems and robotics. This 4-unit course is offered in the first quarter of the students’ freshmen year. No programming experience is expected or required. The course consists of 3-hours of lecture per week and 3-hours of lab. The version we implemented involved the use of an Arduino board and other hardware to implement an autonomous line following robot. [3], [7] We implemented this course as a flipped course with and on-line material covering the traditional “lecture” part of the course and individual and team based activities in

7th First Year Engineering Experience (FYEE) Conference August 7 – 8, 2014, College Station, TX

T1D-1 Figure 1 Robot with Bluetooth and IR sensors Session T1D Microcontroller board and the other hardware components simple print commands that will send the output to the needed to control the robots movements. Arduino IDE running on the student’s computer. The IDE As discussed below there were weekly lab assignments provides a terminal window to show the results of these that allowed the students to learn the for print commands. programming their Uno board and then to control the To teach the students how to decompose a problem we hardware needed for the robot. There were two main introduced the students to state diagrams and state projects for this course. The first project was due six weeks . Many embedded systems can be represented by into the quarter. This project involved the use of wheel state diagram due to the asynchronous nature of their inputs encoders and Bluetooth to control the movement of the and outputs. Designing using state diagrams allowed us to robot. The final project for the quarter was the teach the students a process for decomposing a word of a line following using IR problem into something they can program. The process for sensors. going from a state diagram to a state implementation is fairly straight forward. Not only does this give the students a process for developing their embedded system but also forces them to decompose the problem before starting to implement a solution. There were seven laboratory assignments in to the two projects. These labs introduced programming concepts as well as introducing the students to the hardware needed for their projects.

Laboratory Assignments

1) Introduction to the Uno Board, LEDs and IDE 2) Implementing State Machines 3) Introduction to ++ objects 4) Configuring and using the Bluetooth module 5) Motors and the L293D chip

Figure 2 6) Wheel encoders (project #1 due this week) Line Following Robot 7) IR sensors

DEVELOPMENT ENVIRONMENT FLIPPED CLASSROOM The Arduino ecosystem includes multiple microcontroller This was my first experience with flipping a course. In a boards all based on ATMega from Atmel, flipped course the students spend time outside of the multiple shields that allow for simple attachment of classroom learning the material and the classroom “lecture” hardware to the microcontroller board and an IDE for time is spent on activities that reinforce this material. In a programming the board. [1]. [5] flipped course the outside material typically consists of Ease of use of both the hardware and software makes watching videos, textbooks and looking at websites. the Arduino ecosystem well for teaching students Since this was my first experience flipping a course, we about embedded systems. The Arduino Uno board used in were only able to provide on-line material for the first 6 this class provides 16 digital I/O pins, 5 analog input pins, weeks. and a USB connection for programming the device. To present the on-line material we used Cal Poly’s The real power of this ecosystem comes from the learning management tool called PolyLearn. The course Arduino IDE and libraries that come with the IDE. The IDE material was broken up into one or two week modules. runs on , Mac OSX and Windows. This programming These modules provided the students with videos covering environment hides much of the details of the the material, slides from the videos and source code to microcontroller and lets the students focus on programming review. We created the videos using a combination of the device without worrying about correctly configuring PowerPoint slides, the Explain Everything app on a pins and other chip related configuration. Samsung tablet and Camtasia for . [4] The language supported by the IDE is C++ but much of In addition to the on-line material, each module the details of C++ are hidden from the . The included an on-line quiz. The intent of this quiz was to environment lets the students directly access I/O pins to motivate the students to go through the on-line material. receive input and control devices. The IDE also allows the While the quiz provided some assessment of their programmer to the program running on the of the material, the intent of these on-line microcontroller via the same USB connection used for quizzes was primarily motivational. programming the Uno board. The programmer can write

7th First Year Engineering Experience (FYEE) Conference August 7 – 8, 2014, College Station, TX T1D-2 Session T1D The in-class “lecture” component of the course was no programming skills. This caused a number of focused on activates to reinforce the material reviewed problems. The students without programming outside of class. These activities included an in-class quiz experience were intimidated by the experience students. the day after the on-line quiz was completed. This This creates a two tiered class with some students individual quiz allowed me to assess how well the students getting lost while other students are bored. Creating a had learned the on-line material. curriculum including lecture, lab and projects for these Following this in-class quiz the students broke up into two skill sets is almost impossible. predetermined groups of 4-6 students and took the same in- We are currently looking at different solutions to class quiz as a group. This group quiz allowed the students this problem. These include having the skilled students to work through the material with their peers in order to act as team leaders or creating a special section of the come up with the correct solution. course for the experience students. We are also The remainder of the “lecture” time was spent on a planning on coaching students with AP credit in number of activities. These activities included creating state computer science to skip this course. diagrams, implementing state machines, and answering 4) State diagrams - From a pedagogical perspective, questions on the material. Any remaining time was spent on teaching problem decomposition using state diagrams the laboratory assignments and the two projects. seems to be an effective approach. The biggest complain for using this approach came from the RESULTS experienced . While they did not have any Overall we felt the flipped version of the course worked formal way to decompose problems they resisted well. Many of the students commented that the videos were learning a formal technique. nice because the students could them at their own pace. The students also enjoyed the team based quizzes and Since this is the first time we taught this course, asked for more of these. From an instructor perspective the assessment of its effectiveness is still an open question. We team based quizzes worked very well. It was rewarding to have a significant amount of long term from students watch the students discuss in depth the concepts presented taking previous sections of this course. This data includes in the video in order to convince other team members that first year student retention and student performance in their answer was correct. future computing courses. Sometime this summer we will The creation of the flipped material took a significant receive the first look at how this embedded system course amount of time. Even though we spent more time preparing compares to our other approaches. for this course than any other course, it fell short of our CONCLUSION expectations. We are scheduled to teach this course again in the fall 2015 and plan to use the same flipped approach. This work looked at two questions regarding teaching an Having many of the videos already created will significantly introduction to computing course. First, was using an reduce the preparation time. embedded systems approach using the Arduino ecosystem Other results: an effective approach to teaching an introductory course. 1) Hardware – Identifying and creating the hardware kits Second, was this embedded systems approach amendable to took a significant amount of time. We are currently being taught in a flipped manner. looking for a prepared kit that will save time and We do not feel we have an answer to the first question. expense. The problems with hardware hampered our ability to teach One issue with using a hardware based approach is other topics. Missed wiring, Arduino problems and other that it introduces another variable to learning how to hardware issues can take significant time to address. This program. While the Arduino environment is helpful, time takes away from the students learning and also ties up problems with hardware (e.g wiring, parts in the instructor for long periods of time. backwards) add another level of complexity to teaching Regarding the second question, the use of a flipped a student to program. model for this type of course, we feel strongly that this type 2) Arduino Uno Board issues – The Revision 3 (R3) of the of course is very conducive to using the flipped model. Uno board has sporadic problems with uploading Much of the material covered work well in video and this software. Each week multiple students would waste up allowed us to utilize the “lecture” time to reinforce and to an hour trying to work around this problem. This is a practice this material. known issue with these boards. This coming fall we are using the SparcFun Redboard [2]. This Uno compatible REFERENCES board uses a different approach to programs. [1] www.atmel.com Based on our testing the Redboard does not have these uploading issues. [2] SparkFun Redboard (https://www.sparkfun.com/products/12757) 3) Differences in student programming skills – In this [3] Cambron, M. “Using the Arduino in Freshmen Design”, Proceedings th course 1/3 of the students came into the course with of the 6 FYEE Conference, August 7-9, 2014 strong programming skills and 1/3 of the students had

7th First Year Engineering Experience (FYEE) Conference August 7 – 8, 2014, College Station, TX T1D-3 Session T1D [4] Saterbak, A., Muscarello, A., and Wettergreen, M. “Workshop: Developing Videos and Support Materials for First-Year Engineering Design Courses”, Proceedings of the 6th FYEE Conference, August 7- 9, 2014 [5] www.arduino.com [6] Jamieson, P., “Arduino for Teaching Embedded Systems. Are Computer and Engineering Educators Missing the Boat?” Proceedings WorldComp 2010. [7] Balasubramanian, R., York, Z., Dorran, M. Biswas, A., Girgin, T., Sankaralingam, K., “Hands-on Introduction to Computer Science at the Freshman Level”, Proceedings SIGSCE, March 05-08, 2014. [8] Summet, J., Kumar, D., O’Hara, K., Walker, Ni, L., Blank, D., Balch, T. “Personalizing CS1 with Robots”, Proceedings SIGSCE, March 3- 7, 2009.

AUTHOR INFORMATION

Hugh Smith Associate Professor, Department of Computer Science, Cal Poly, [email protected]

7th First Year Engineering Experience (FYEE) Conference August 7 – 8, 2014, College Station, TX T1D-4