Arduino mega AND Raspberry Pi -why?

I see talk of people connecting Arduino and raspberry together but I cannot find why. Could people provide examples where this would be advantageous to connect together rather than an either or scenario?

I'm eagerly waiting for my mega kit to arrive from proto-pic btw! :slight_smile:

The Pi has much more processing power than the Arduino, but the Arduino has more I/O.
People often combine the two to get the advantage of both.

I have a PI.

Now, what to do with it?

I've been asking myself the same question since the PI came on the market. The difference is that I haven't bought one. I'm content with Linux on this netbook as I like having a screen, keyboard, battery and power supply, hard disk etc.

...R

I think the Pi has it's uses and it's market although having said that, it does not have as much I/O as the Arduino but on the other hand is more powerful than an Arduino but not quite powerful enough to do many of the things I would like it to do so just land up using a small factor ATX motherboard.

The Pi does have HDMI out so you can connect a monitor to it, has USB so you can connect your keyboard and mouse.
As far as a HDD is concerned, I have been running Linux for years and never install it to HDD, rather I use a USB stick and use that as my persistent storage and the whole thing runs in RAM.
Lightning fast and the saves are optional which cuts down on wear and tear of the USB stick and also one can experiment to your hearts content with no fear of trashing anything.
If something goes catastrophically wrong, just reboot and the original settings are back.
The other nice thing is that one can carry your Linux around with you (on the USB stick) and plug it into almost any computer that supports booting off USB and bingo everything is there just like on your own computer.
Lots to be said about a USB install.

Of course not all Linux distros support this so I simply don't use the ones that are not compatible.

It's also very easy to modify the boot sector of the USB stick to make it report itself as a fixed HDD, but the problem then is it get's thrashed by all those writes that many operating systems rely on.

Quite simply the I/O on the Pi is not reliable. That is Linux will very regularly switch out your code to do something else. So this means you can't do anything that involves real time control. For example a matrix scan will glitch, input data will be lost or the whole thing will appeare to freeze for a second or so. You can't generate PWM or servo control signals and things like reading a rotary shaft encoder will not work.

So the arduino is used to get over that problem in a real time application.

I have the PI and the Arduino… well that is en-route.

Currently have two projects in mind:

  1. Automated Chicken house - Feeder, door opener / closer, IR camera, chickencounter (to ensure all chickens are in), light sensor (close the door at night as chickens usually put themselves to bed). All automated, but with local network and interweb based control.

  2. Model railway points, track circuit, signal interlocking.

I have the PI and the Arduino.... well that is en-route.

Currently have two projects in mind:

  1. Automated Chicken house - Feeder, door opener / closer, IR camera, chickencounter (to ensure all chickens are in), light sensor (close the door at night as chickens usually put themselves to bed). All automated, but with local network and interweb based control.

  2. Model railway points, track circuit, signal interlocking.

Diesel9a1:
I have a PI.
Now, what to do with it?

I have a book, it is just out today, that has lots of Pi projects and one ( chapter 16 ) has an Arduino talking to a Pi.

Diesel9a1:
I have the PI and the Arduino.... well that is en-route.

Currently have two projects in mind:

  1. Automated Chicken house - Feeder, door opener / closer, IR camera, chickencounter (to ensure all chickens are in), light sensor (close the door at night as chickens usually put themselves to bed). All automated, but with local network and interweb based control.

  2. Model railway points, track circuit, signal interlocking.

Project 1 sounds ideal for a Pi by itself.
Project 2 sounds like it would benefit from an arduino if you want to generate PWM signals to control the speed of your train. Otherwise it could be done with either.

Remember the Pi needs about a minute to boot up, and has to be shut down. The Arduino takes about 2 seconds to boot up and you can cut it down by just pulling the power.