Getting Started with Raspberry Pi by Matt Richardson & Shawn Wallace

Getting Started with Raspberry Pi by Matt Richardson & Shawn Wallace

Author:Matt Richardson & Shawn Wallace [Richardson, Matt and Wallace, Shawn]
Language: eng
Format: epub, pdf
ISBN: 9781449344214
Publisher: O’Reilly Media, Inc.
Published: 2013-03-25T16:00:00+00:00


Chapter 6. Arduino and the Pi

As you’ll see in the next few chapters, you can use the GPIO pins on the Raspberry Pi to connect to sensors or things like blinking LEDs and motors. If you have experience using the Arduino microcontroller development platform, you can also use that alongside with the Raspberry Pi.

When the Raspberry Pi was first announced, a lot of people asked if this was an Arduino-killer. For about the same price you can get much more processing power; why use Arduino when you have a Pi? It turns out the two platforms are actually complementary, and the Raspberry Pi makes a great host for the Arduino. There are a few other cases where you might want to Arduino and the Pi together:

There are lots of libraries and sharable examples for the Arduino.

If you already have a good working Arduino project that you want to supplement with more processing power. For example, maybe you have a MIDI controller that was hooked up to a synthesizer, but now you want to upgrade to synthesizing the sound directly on the Pi.

When you’re dealing with 5V logic levels. The Pi operates at 3.3V, and its pins are not tolerant of 5V.

You may be prototyping something a little out of your comfort zone and may make some chip-damaging mistakes. I’ve seen students try to drive motors directly from a pin on the Arduino (don’t try it); it was easy to pry out the damaged microcontroller chip out of its socket and replace it (less than $10 usually). No so with the Raspberry Pi.

When you have a problem that requires exact control in real time, such as a controller for a 3D printer. As we saw in Chapter 3 Raspbian is not a Real Time operating system, and programs can’t necessarily depend on the same "instruction per clock cycles" rigor of a microcontroller.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.