Difference is:
When you write code in processing, you write code for your laptop/pc which is a FULL-FLEDGED computer, with CPU, graphics card, lots of RAM, with hard-drive, with mouse, keyboard, USB ports, serial ports (COM-ports) and so on. When you write sketch in Processing, you actually code in Java (simplified flavour), and later your code is compiled and finally EXECUTED ON YOUR LAPTOP CPU.
Whereas when you code for Arduino, you write code NOT for full-fledged laptop, but for a piece of plastic and silicon which is called Arduino. It has very little memory (maybe 1 000 0000 times less than your laptop), is has NO harddrive, no mouse, no keyboard, no display, no grpahics adapter, no nothing. It can't draw, it can't receive mouse coordinates, can't read or write files.
EDIT:
And your code is EXECUTED ON VERY SLOW CPU (see the "Microcontroller" on the picture below, that's your CPU), which is as fast as computers were in the 80ties. And you don't code in Java, but in C programming language.
But what CAN Arduino do?
First let's look at what is arduino equipped with?
Basically all we may be interested in are three things:
- digital Pins (on the top)
- Analog input pins (on the bottom right)
- USB Jack (on top left)
If I try to simplify it very much: all Arduino programming is: making a code which will either reads/writes data between
digital pins/analog input pins/usb
Yes. It's that simple: all Arduino can do is:
read some number from USB jack and then do some calculation and either:
- -send data backto usb jack
- -or send data to digitals pins
- -or send data to [some] analog pins
And this is why the first project of everyone on Arduino is "flashing light" - because all you have to do: is just switch electricity in one of the digital pins on off every half a second.
Programming Arduino is similar to programming your Microwave oven. Imagine you would get a chance to upload some code to your microwave? What would you be able to do? Probably you would be able to switch the oven on and off, rotate the plate inside, change power used for cooking, maybe make some sounds with built-in beeper. But that's it.
But why is there such a hype about Arduino?
- If you attach to those "boring" pins different devices (lcd screens)
-Temperature sensors:
-motors
-lights
-beepers
-robot arms
-pens and pencils
-or anything
2) This ability to make new devices allows to blend the real world where we live with the software world, and that seems to be the way to build the future.
When you program arduino you may use an IDE (fancy word for text editor for code) (Arduino IDE) which is
based on processing (IDE) but it's NOT Processing language.
So basically when people say:
Arduino IDE is based on Processing
What they actually mean is
"Arduino text editor is based on Processing text editor"
but AFAIK that's as much as similarity goes.
ps. when I say it "can't draw" i mean that on the basic low-level this is not implemented, without adding extra output devices.
pps. As in regards to Raspberry Pi - it seems to be really full-fledged computer, except but with not fastest processor and not best graphics card. But theoretically you can program Pi using Processing language.