Teach me to robot.
September 16, 2015 3:22 PM   Subscribe

I have an Arduino, and I want to make it do things. I gather that what I really want is a Raspberry Pi in addition to my Arduino. The trouble is, I don't know Python and my C and circuitry skills are severely rusty. So do you know of any online courses or physical books that will teach me all of this as a general subject of "making devices" rather than individual Python, C, and electrical engineering courses of study?

Apologies if this is a vague question, but I'm having trouble pinning down the words for what I want myself. If it makes any difference (or if there's learning material geared toward this), I would mostly be doing things in an artistic capacity rather than an engineering or prototyping capacity. I'm not married to Arduino or Pi either, it's just that they seem to be what's used for this kind of thing.
posted by cmoj to Education (5 answers total) 18 users marked this as a favorite
 
Sounds like you're trying to decide between an arduino & pi and what tech to learn.

How about this approach - decide on a project and the tech decisions will be easier.

For example, I'm currently building a set of bedroom closets and so for the doors and interior lights, gotta wire things so when open the door, the light turns on - a perfect use of an arduino, as this makes inputs (door switches) and outputs (relays to turn on interior lights) easy to wire up, super easy.

If instead of turning on a light, the intention was to log the event in a file, tweet something, take a picture and upload it and send an email, then this is more than the fairly simple arduino is capable of, so then you might look into a raspberry pi.

So my suggestion would be to automate something - there is plenty of learning material on line (good youtube videos) and the resources on arduino.cc are comprehensive. With a project you can focus just on what you need to learn and be a bit more incremental. If your C chops are rusty, then you've seen it before - picking up C on a micro is pretty easy.

A simple arduino project like wiring a potentiometer to a lightbulb to make a rotary dimmer switch would be a great place to start - see AnalogInput for example.

Good luck - have fun -
posted by parki at 3:47 PM on September 16, 2015 [3 favorites]


I think for a robot / art types things you'll want arduino more than raspberry pi. Raspberry pi is more like a miniature PC computer, and you can use for for doing computer things like making an information kiosk or a games console. Arduino is more like a microprocessor for using software (firmware) to control electronic components like sensors and motors.
There is overlap, and you can often use either, and I'm generalizing, but hopefully that overview helps.

There are a ton of books for making devices. Check out Arduino Workshop or just browse amazon for highly rated books that focus on the kind of thing you're interested in.

Buying random back issues of Make Magazine (or the year-by-year box sets) will also be good. Each has a lot of projects and even if a particular project doesn't interest you, you'll learn that X doohicky is how someone approached Y problem/feature - it will orient you, so you'll learn the general lay of the land and how it relates to things you're interested in. Or follow Make Blog for less detailed by higher frequency of exposure to what people are doing and how they're doing it.
posted by anonymisc at 5:08 PM on September 16, 2015 [1 favorite]


You can do a lot of neat things with an arduino! As parki said, it's great for input and output.

The Pi is nice because it is cheap and small enough to be a dedicated, embedded computer for a project, but until you've decided on a specific project, I think anything you can do with it you could do with a regular computer.

To get a basic idea of potential applications of the arduino, I'd have a look through the sample sketches that are included in the IDE, and the corresponding tutorials at www.arduino.cc/en/Tutorial/BuiltInExamples

If you are having trouble coming up with ideas for projects, you could look at shields and sensors available from sparkfun, adafruit, etc. to see if any of them give you ideas, and they are usually quite well documented with example code and applications.

If you want a step-by-step guide to building some starter projects, I'd suggest the book from make magazine: Getting Started with Arduino.
posted by LRAD_der at 5:14 PM on September 16, 2015


Actually, without knowing a lot more about what you're trying to do, I'd suggest that the Arduino has a couple key advantages over the Pi: 1) it's a lot simpler and 2) it's a lot less expensive when you (inevitably) let out the magic smoke.

If, OTOH, you need stuff like network connectivity or machine vision, the Pi (or something like the BeagleBone Green) may be a better way to go.

For books, my number one suggestion would be Getting Started with Arduino by Banzi & Shiloh.

The Make: Electronics and Make: AVR Programming books are useful too, once you've got some experience with the platform and want to take it further.

If you want to robot, you probably want to control some motors. Servos you can control directly from you microcontroller (or microcomputer) of choice. For stepper motors you probably want a stepper motor driver. For small DC motors, an H-bridge is the obvious choice.

The stepper motor controller and H-bridge options are non-trivial from an electrical engineering standpoint. You can get pre-built boards like the Adafruit Motor Shield and not have to worry about that part. (Adafruit is seldom the cheapest option, but I love them -- they provide working software libraries, tutorials and support that are second to none.)

Another option is to get an inexpensive Arduino-based robot kit like the Sparkfun RedBot. That'll give you a working starting point, some early successes, and plenty of options to expand. It'll also let you build skills that will serve you well when you want to roll your own.

Happy Hacking!
posted by sourcequench at 5:35 PM on September 16, 2015


cmoj: "I'm not married to Arduino or Pi either, it's just that they seem to be what's used for this kind of thing."

sourcequench: "… without knowing a lot more about what you're trying to do …"
Yeah, what you want to do - actually, the scale of what you're trying to do - is the key thing.

Quick rough-and-ready analogy/example:
  • If you wanted to make an autonomous art piece - say, something that incorporates blinkenlights or movement, and maybe reacts to its environment in limited ways - you'd use something like an Arduino.
  • If you wanted to synchronise a whole bunch of pieces together into a huge art environment with some central control - maybe some heavy logic or machine-learning style to respond in subtle and non-preprogrammed ways to its environment - you'd use something like a RPi.
Now there's definitely a lot of overlap between the two - a RPi can certainly do (most of) what an Arduino or similar can do, and an Arduino can do many things that in other contexts you'd choose an RPi for - but that's the basic idea.

Concrete examples: a guy on another forum I frequent runs an art engineering company (White Wing Logic). If you've been through Heathrow Terminal 2 in the last year or so, you may have seen this piece he worked on. It uses 170 PIC32 micros (bigger cousins of the Arduino chips) to drive the all the LEDs & motors.

He also did the LED panels for the Cadbury Joy Jacket which I believe use Arduinos as panel controllers, and a RPi to control it all (though that part was done by Hirsch & Mann), and the servo controllers & animation player for Lady Gaga's Bubble Dress.

Or maybe you've recently wandered past the Weill Cornell Medical College in NYC. He did the electronic design & engineering for their Discovery Wall, which again uses a PIC32 for each 'pixel' and is controlled by custom ASIC FPGA chips overseen by (I believe) RPi.

So again, what it comes down to is scale - "what is the most appropriate / simplest for my purpose?". And remember, it's not an either/or proposition (as the above links show). Personally, if your programming & electronics is rusty-to-non-existant, I'd suggest starting with the Arduino if it's at all appropriate to your intended scale.

Despite the many issues I personally have with the IDE, libraries, & whole Arduino environment, it's pretty straightforward to learn (although it's essentially C, it's certainly not "jump into the deep end of C" hard), and you'll probably find everything you need for at least proof-of-concept designs available as cheap shields / modules (moreso than the RPi / Beagleboard / Galileo / etc) with no soldering required.
posted by Pinback at 8:28 PM on September 16, 2015


« Older Cake Cake Cake Cake Cake   |   Why does PBS show the same old music shows during... Newer »
This thread is closed to new comments.