Asee peer logo

A Blocks-based Visual Environment to Teach Robot-Programming to K-12 Students

Download Paper |


2015 ASEE Annual Conference & Exposition


Seattle, Washington

Publication Date

June 14, 2015

Start Date

June 14, 2015

End Date

June 17, 2015





Conference Session

Best of Computers in Education

Tagged Division

Computers in Education

Tagged Topic


Page Count


Page Numbers

26.17.1 - 26.17.12



Permanent URL

Download Count


Request a correction

Paper Authors


Raghavender Goud Yadagiri NYU Polytechnic School of Engineering

visit author page

Raghavender Goud Yadagiri received his B.Tech degree in Electronics and Communication Engineering from JNTUH, Hyderabad, India, in 2011. After obtaining his B.Tech he worked as an Embedded Associate at Thinklabs Technosolutions Pvt. Ltd for two years. He is currently pursuing a M.S degree in Electrical and Computer Engineering with specialization in Computer Engineering. Raghavender conducts research in the Mechatronics and Controls Laboratory at NYU Polytechnic School of Engineering since his first semester as a M.S student, where his interests include Embedded Control and Robotics.

visit author page


Sai Prasanth Krishnamoorthy NYU Polytechnic School of Engineering

visit author page

Sai Prasanth Krishnamoorthy received his BSEE from Amrita University in 2014 and is currently pursuing his MSEE at NYU Polytechnic School of Engineering. He conducts research in Mechatronics and Controls Laboratory at NYU and his research interests include robotics, automation, rapid prototyping and computer vision. He is a member of IEEE Robotics and Automation Society.

visit author page


Vikram Kapila NYU Polytechnic School of Engineering Orcid 16x16

visit author page

Vikram Kapila is a Professor of Mechanical Engineering at NYU Polytechnic School of Engineering (SoE), where he directs a Mechatronics and Control Laboratory, a Research Experience for Teachers Site in Mechatronics and Entrepreneurship, a GK-12 Fellows project, and a DR K-12 research project, all funded by NSF. He has held visiting positions with the Air Force Research Laboratories in Dayton, OH. His research interests include K-12 STEM education, mechatronics, robotics, and control system technology. Under Research Experience for Teachers Site and GK-12 Fellows programs, funded by NSF, and the Central Brooklyn STEM Initiative (CBSI), funded by six philanthropic foundations, he has conducted significant K-12 education, training, mentoring, and outreach activities to integrate engineering concepts in science classrooms and labs of dozens of New York City public schools. He received NYU-SoE’s 2002, 2008, 2011, and 2014 Jacobs Excellence in Education Award, 2002 Jacobs Innovation Grant, 2003 Distinguished Teacher Award, and 2012 Inaugural Distinguished Award for Excellence in the category Inspiration through Leadership. Moreover, he is a recipient of 2014-2015 University Distinguished Teaching Award at NYU. In 2004, he was selected for a three-year term as a Senior Faculty Fellow of NYU-SoE’s Othmer Institute for Interdisciplinary Studies. His scholarly activities have included 3 edited books, 7 chapters in edited books, 1 book review, 55 journal articles, and 109 conference papers. He has mentored 1 B.S., 16 M.S., and 4 Ph.D. thesis students; 31 undergraduate research students and 11 undergraduate senior design project teams; over 300 K-12 teachers and 100 high school student researchers; and 18 undergraduate GK-12 Fellows and 59 graduate GK-12 Fellows. Moreover, he directs K-12 education, training, mentoring, and outreach programs that currently enrich the STEM education of over 1,100 students annually.

visit author page

Download Paper |


A Blocks-based Visual Environment to Teach Robot-Programming to K-12 Students This paper considers the use of a blocks-based visual environment to demonstrate and teachrobot-programming to K-12 students. A visual programming environment is built using theopen-source, JavaScript-based, Blockly library developed by Google. Our approach illustratesthat robot-programming can be done in an easy, educational, and fun manner without burdeningthe students to first acquire the knowledge and experience with advanced programming conceptsand robot hardware. For illustrative purposes, we employ a low-cost, single-board computer,such as Raspberry Pi, with embedded microcontrollers, such as Brick Pi for LEGO or ArduinoUNO. The drag and drop feature of blocks, common to visual programming environments suchas Scratch, make the developed interface familiar and appealing to K-12 students and allows it tobe intuitive to learn robot-programming. To promote students’ understanding of programmingconcepts and constructs, the developed visual environment allows them to view the underlyingC-code of the block diagram that they create for robot-programming. This approach enables thestudents to compare the codes for different blocks on the fly while programming the robot and itallows them to comprehend the expected behavior of the robot.On-board the robot, a Raspberry Pi computer is used to run a Linux-based server which streamsthe web-based visual programming environment to the end user’s web browser. The end usercreates her robot-program by interacting with the visual programming environment on the webbrowser. This web-based approach offers operating system (OS) independence, thus obviatingthe need to develop OS-specific applications and allowing the end user to work with Mac, Linux,or Windows OS. To demonstrate this blocks-based visual programming environment, we showthe control of two different mobile robots. First, we consider a wheeled mobile robot that isconstructed using the LEGO NXT hardware, with a Brick Pi serving as its embeddedmicrocontroller that is interfaced with the Raspberry Pi computer. In this configuration, the BrickPI serves as an interface between the Raspberry Pi and LEGO NXT sensors and actuators.Second, we consider a two legged mobile robot that is constructed using 3D-printed componentsfor body parts and joints and servo motors for actuation, with an Arduino UNO serving as itsembedded microcontroller that is interfaced with the Raspberry Pi computer. To command andcontrol each of the mobile robots, the developed visual tool employs blocks corresponding tobasic programming constructs such as loops, conditional statements, variables, and procedures.For a user-created robot-program, the web-based programming tool Blockly is used to generatethe corresponding C-code and is wirelessly sent from the user’s browser to the server running onthe Raspberry Pi hosted on the mobile robot. The Raspberry Pi automatically compiles andexecutes the received C-code.To illustrate the ease, education, and fun value of our approach, a maze-based educational gamehas been developed. Specifically, the game requires the user to program a robot through ourvisual tool to navigate the maze and score points that are distributed throughout the maze. Thefinal paper will provide details of the visual tool, two mobile robots, and preliminary results froma pilot study involving students’ interaction with the aforementioned robot-programming tool inthe game environment.

Goud Yadagiri, R., & Krishnamoorthy, S. P., & Kapila, V. (2015, June), A Blocks-based Visual Environment to Teach Robot-Programming to K-12 Students Paper presented at 2015 ASEE Annual Conference & Exposition, Seattle, Washington. 10.18260/p.23358

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: © 2015 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