B.Goode wrote: ↑
Fri Jun 28, 2019 9:47 am
Welcome to the Raspberry Pi forums.
Arduino or RPi?
Arduino is simpler (only one single task.)
Arduino can provide tighter time-critical control (because it has no Operating System.)
Arduino can support Analog devices directly via built in ADC connection pins.
Arduino offers pretty much no choice of programming language or development environment.
Arduino usually requires code development on an external system and an 'upload' step before the code can be tested.
Summary: they are too different to make a binary decision - use both
as appropriate, as necessary.
Arduino = only single task is not true. For all Arduinos there is cooperative multithreading provided by the Scheduler class, and additionally there are RTOS-based (semi-) preemptive multithreading libs for Teensy (TeensyThread for M4 single cores) and ESP32 (RTOS and std::thread for the ESP32 dual cores).
The biggest pro for Arduinos is the simple and convenient IDE and API which provide tons of libs for almost everything.
Arduino is programmed in C++ but there are also other PLs (e.g. Java and Scratch, not very common though)
Programming the Arduino on a PC or a Pi and then uploading is correct, it's almost like programming the Pi via ssh or perhaps via Windows toolchains.
Also IoT programming is far easier using the Arduino IDE, e.g. via esp8266 or esp32 wifi and webserver libs (I have not tried the Arduino Wifi shield yet admittedly).
For programming the Pi I am now also using C/C++ via the Geany IDE like some others before, because command line compiling/building and makefiles and all that was too complicated and too cumbersome to me.
The Raspi foundation supports just Python, but there is a MagPi for free download about C programming which is quite fine.