Are there any advantages to using small microcontrollers (such as an Arduino, etc.) with tactile, physical I/O (such as buttons, LEDs, robotic actuators, etc.)? For instance, does it help create more interest in learning computer programming, or widen the potential audience among kids and undergrads for going further in their CS education?
Microcontrollers can address two important aspects.
The first is bridging the gap between the code, and the real world. Particularly if you have sensors (accelerometer, buttons) and outputs (an LED array, sound, motors). Not just to address the robotics aspect (which can rapidly get complex), but some simple game concepts (patterns, reactions). Nothing which is any harder than doing the same on a Raspberry Pi with a GPIO extension, but potentially cheaper hardware (which is important if it is likely to get fried). Also, if you want a battery powered device, or a small data-logger, a microbit is more suitable than a Raspberry-Pi.
For introductory use, I think creating a simple tilt-sensitive animation is a very effective way of making 'coding' seem more real. Yes, the coding gets more complicated if you want to do more - but starting in a block editor or python avoids this.
The more tactile, less 'black box' approach to coding seems (according to research by the BBC) seems to provide more up-front interest to less technical students.
The second aspect is working in a resource-constrained environment. Admittedly this is more a advanced concept to teach, but the microcontroller is 'clearly' a different beast to a laptop or a phone. Having some restrictions sometimes help people to solve problems more easily than giving them the blank sheet of 'plus anything you can find a python library for'. A computer small enough to wear on a lanyard will shift the way students think about what is possible.
If the goal is to create more interest in learning programming (as you state above), then Arduinos are not the strongest vehicles for reaching that end. The logic of
void setup() and
void loop() are not immediately accessible nor intuitive to a student brand new to programming. For one who is experienced and/or is inclined toward mechanical/electrical engineering, then Arduinos are fantastic.
That being said, I have seen firsthand how a Raspberry Pi can indeed be that inspiring device for wanting to learn more.
- It's a full computer. The simple fact that you can spend $35 on a computer (not including peripherals) is mind-blowing to start. The sheer size/cost is initially surprising and piques curiosity. Plus, this makes for a great conversation about operating systems and open source.
- Students can level up. A student can begin with Scratch, make music with Sonic Pi, make art with Processing, hack Minecraft with Python, learn the basics of the Linux command line, and potentially move on to Java with BlueJ. To me, it is the essence of "low-floor, high-ceiling" when it comes to learning programming.
- GPIO pins unite programming and physical computing. A student who becomes adept at Scratch can move on to interacting with lights, buttons, and sensors even from just within Scratch. Using a variety of accessories, such as the Pi Camera or the Sense Hat, students can go from software to hardware seamlessly.
I could go on and on, but I think in terms of creating excitement and interest, the Pi is incredibly successful.
Advantages compared to what? I will assume compared to programming abstract applications on a desktop.
Programming abstract applications on a microcontroller does not provide any obvious advantages, beyond teaching students what a microcontroller is.
You get advantages when it comes to what I call "Applied Programming".
On a desktop, it's difficult (but not impossible) to come up with something that's within students' capabilities to program, is useful or fun, and of which you can't download a better version from the internet.
If your application involves hardware, you can't download it from the internet. Microcontrollers + hardware allow students to build something "tangible". Something they can see and touch. For some - but not all - students this offers far greater motivation, especially in a context that is more akin to a workshop than a classroom.
If you're not producing something tangible, I don't see much benefit to using microcontrollers. Microcontrollers are not the only way to produce something tangible, but given their low price point they are a competitive option.