Suggested exercises for learning with Arduino

arduino

I just got an arduino and have been working through some of the exercises in the tutorials, making good progress.

When I'm learning a new programming language or tool, I usually work through a few steps:

  1. do the tutorials,
  2. modify the tutorial programs, get them to do new stuff, and
  3. solve a problem not covered in the how-to to make myself figure out how to do stuff.

With Arduino, I have a bit of a chicken-and-egg problem. I don't have a good enough idea what I can do with it to come up with interesting problems to solve.

What are some good problems/exercises I can tackle as a beginner to help myself learn more about what Arduino can do and how to do it?

Problem statements only, please. Any instructions for solving them would defeat the purpose (though, it might make sense to point out what hardware is required.)

Best Answer

To learn what you can do we should start with hardware capabilities of the platform. The Arduino (and other uC system that uses the ATmega328 or ATmega644) have a basic set of resources that are brought out to pins on the uC --

digital inputs - You use this to read a binary signal. A voltage greater than around two volts is a one and less than 0.8V is zero. These are used to read the state of a binary device like a switch (mechanical, tilt, etc).

digital outputs Binary outputs. Use to turn on or off a device. LEDs, motors, etc. With high current devices you usually need to add additional circuitry (like a transistor or motor driver).

analog inputs These are used to read signals from analog outputs -- such as from a sensor. Low cost temperature sensors can have analog outputs, light sensors, etc. The analog input converts the analog signal into a digital value that can be used by your program.

communications ports To communicate to the outside world a UART is provided. This enables you to send ASCII strings to an external device (most people convert the UART to a USB port). There are two other protocols available -- SPI and I2C. These are primarily used for communications within a system. Using these two communciations interfaces additional capabilities can be added to a system such as high current latches, analog outputs, real-time clock, SD storage. The list of SPI and I2C peripherals is long.

I presented an "Intro to Microcontrollers" at the MIT Barcamp in 2009. The handout is at -- http://www.luciani.org/not-quite-ready/not-quite-ready-index.html

Now that we have a summary of most of the capabilities what are your interests? Here are some example projects --

robots A lot of people do simple robots with their Arduino.

art A number of artists create interactive pieces with the Arduino. Add motion, motion sensing, leds, sound

music You can create a numerically controlled oscillator (see http://wiblocks.luciani.org/docs/app-notes/nb1a-nco.html ). You could create a midi device or an analog output sequencer that controls an analog synth.

datalogger A number of people are doing datalogging applications. Temperature, humidity, light. Performance measurements for physical activity, etc. Energy monitoring.

control A number of people are doing CNC control with the Arduino or Sanguino.

If I were starting I would purchase a copy of "Making Things Talks" (MTT) from O'Reilly and extend the examples. MTT works as a cookbook and a reference.