Joe Harry wrote:I'm now starting to think if I could do all this just with a Raspberry Pi instead of the Arduino.
I agree. For this particular project, Arduino doesn't add any obvious value.
Joe Harry wrote:Not sure what is the benefit of using Arduino!
From my experiences on my own hobbyist projects, I use the following guidelines to score if a microcontroller (like arduino) is a good idea in a project that already has a SBC ("single board computer", like RPi / Beaglebone...)
- If there are analog inputs and the SBC does not have analog pins (such as the RPi).
A simple ADC circuit may be good enough but my scale tips towards a mc if project also meets one or more additional criteria below.
- If the project is mostly powered by power banks or battery packs, and low current draw is good enough most of the time.
The best example is video surveillance where initial probable motion is detected by mc using PIR sensor, which then then switches on the SBC for video recording or image processing.
None of the SBCs I have has any kind of low power mode that I know of (I'm not certain about this, it may only be my ignorance).
- If project has hard or soft real time constraints.
I've noticed this problem particularly with servos, because their motion is directly proportional to accuracy of pulse width.
With RPi using simple time.sleep(), the motion is visibly jittery and I have to resort to using pigpio or servoblaster which rely on DMA instead of OS timing.
With arduinos, this has never been a problem. I don't think arduino Atmels are actually realtime by design, but their simplicity means their working is quasi-realtime and that's good enough for me.