This paper presents a robot-Visual Programming Environment (VPE) interface that can support K-12 students to learn science, technology, engineering, and math (STEM) concepts. Specifically, we employ Google's Blockly VPE to construct a blocks-based visual programming tool to facilitate easy programming of and interaction with physical robots. Through a careful and intentional integration of the Blockly VPE and physical robots, we illustrate that many K-12 level STEM concepts, which are traditionally treated through lectures and problem-solving, can be explored in a hands-on manner. The use of Blockly VPE obviates the need for prior experience with computer programming or familiarity with advanced programming concepts. Moreover, it permits students to learn various programming constructs, sequentially, starting from the fundamentals and gradually progressing to advanced concepts. The web-based Blockly VPE provides an interface that allows the user to browse through a block library and construct a block code for which a corresponding C program is automatically generated. The default web-based Blockly interface has been modified to permit the user to edit the resulting C program or to create an entirely new C program. Moreover, the Blockly VPE allows the user to wirelessly upload the C program to a Linux server running on a Raspberry Pi computer hosted on the robot. The Raspberry Pi compiles the received C program and serially transfers corresponding instructions to the robot's embedded hardware. The efficacy of the proposed robot-VPE interface is examined through students' experiences in conducting several illustrative robot-based STEM learning activities. The results of content quizzes and surveys show gains in students' understanding of STEM concepts after participation in robotics activities with the VPE interface.