The RPi is a PC in a very small package an it (uusually) uses the Linux operating system. For many purposes having an operating system is very useful - especially as it allows the appearance that several complex programs can run simultaneously and it manages access to the complex peripherals such as keyboards and disk drives and screens. But because it does that it is not possible to guarantee precise timing - it might be checking for a keyboard when you would prefer it to be doing something else.

An Arduino has no operating system so it gives all of its resources to running your program. That is the reason they are used for jobs where precise timing matters - for example driving 3D printers or CNC machines or detecting the speed of a rotating shaft. The downside with an Arduino is that its clock speed is only 16MHz and an Uno has only 2000 bytes of SRAM.

Using an Arduino in conjunction with a PC or an RPI can give you the best of both worlds. I have added stepper motors to my small lathe. Most of my software is written in Python and runs on my laptop. The Arduino is only used to control the stepper motors to implement the moves calculated by the PC program.

I confess that I have not yet managed to convince myself that it would be worth buying an RPi as I can do all the "PC" programming that I need on one of my laptops which come with a screen and keyboard and an uninterruptible power supply.

...R

Two or three hours spent thinking and reading documentation solves most programming problems.

I'm confused if the Arduino uses C C# C+ C++? Looking though the FAQ quickly, is it just functions from so and so of these languages or is there more?

It's C/C++; you can write plain C if you want although some stuff that you normally will use is C++. E.g. Serial.print is pure C++ because the print method is overridden depending on what you print. From a 'user' perspective you use it to print a text, a number etc. In pure C, you would have a function to print a text (e.g. printText and printNumber). In pure C, you would have a function to print a text (e.g. printText) and to print a number (e.g. printNumber).

There are a number of classes, methods and functions that are specific to the Arduino; the serial class and its methods, functions like digitalRead and digitalWrite and so on. On the Pi they will more than likely be non-existing; I found e.g. Introduction to accessing the Raspberry Pi's GPIO in C++ (sysfs) (a library might exist though)

The RPi is a PC in a very small package an it (uusually) uses the Linux operating system. For many purposes having an operating system is very useful - especially as it allows the appearance that several complex programs can run simultaneously and it manages access to the complex peripherals such as keyboards and disk drives and screens. But because it does that it is not possible to guarantee precise timing - it might be checking for a keyboard when you would prefer it to be doing something else.

An Arduino has no operating system so it gives all of its resources to running your program. That is the reason they are used for jobs where precise timing matters - for example driving 3D printers or CNC machines or detecting the speed of a rotating shaft. The downside with an Arduino is that its clock speed is only 16MHz and an Uno has only 2000 bytes of SRAM.

Using an Arduino in conjunction with a PC or an RPI can give you the best of both worlds. I have added stepper motors to my small lathe. Most of my software is written in Python and runs on my laptop. The Arduino is only used to control the stepper motors to implement the moves calculated by the PC program.

I confess that I have not yet managed to convince myself that it would be worth buying an RPi as I can do all the "PC" programming that I need on one of my laptops which come with a screen and keyboard and an uninterruptible power supply.

...R

A Raspberry-Pi is MORE than capable of handling the real-time aspects of CNC control - FAR more so than an Arduino. There are plenty of Raspberry-Pi-based CNC controllers out there, including LinuxCNC, which is undoubtedly the best open-source CNC controller in existence. The Beaglebone-Black is also widely supported. With ~100X more computing power, and memory, there is littel the Arduino can do that an R-Pi cannot do just as well, and usually better. And, of course, with am R-Pi and Linux, you'd be able to use an actual debugger, and numerous other very useful tools, not least of which would be true pre-emptive multi-tasking, that Arduino users can only dream of.

Last, but not least, on "Arduino vs Raspberry pi" in title of this thread. I prefer to use both, especially the Pi Zero with its v1 camera as high horse power video capturing&processing coprocessor for Arduino Due (sitting on back of caterpillar robot) doing PID motor control based on data provided by Pi Zero:https://forum.arduino.cc/index.php?topic=412642.msg3512160#msg3512160