News Raspberry Pi Costume Automatically Dispenses Candy

Why do people continue using raspberry pis for projects like this? This is an ideal application for a microcontroller, using a pi for this is totally ridiculous. I get sticking to what you are used to, but if you can program the pi to do this you should be able to program a microcontroller to do it too.
 
First, I found this page because my friend send me this link via chat. I have used Tom's hardware since like the early 2000's. I didn't realize there is a forum until I saw the comment section.

To answer question around hardware, all design choices were made because I had 3 weekends to finish the project. Including coding/building/testing/painting/etc. These were parts I had available or available in my local microcenter. The Servo was a FS90R which required 4.8-6V input, the break beam sensor is an Adafruit sensor(https://www.adafruit.com/product/2168). The ultrasound sensors are HC-SR04. The only downside I found is that bright light messes with the IR sensor(not a problem for me since it functions perfectly after 4:30pm local time).

As for why the RPI4, because the next goal is to have Nodejs running Express so I can monitor the state of the device on a webpage(i.e. jam, boxes left, boxes given, error rate, sensor failure, etc). I don't have enough experience with microcontroller to know how to do that. My background is CS with API work.
 
Last edited: