HOME  > >  ARDUINO MAIN PAGE  T.O.C.     Delicious Bookmark this on Delicious   Recommend to StumbleUpon

Arduino "How Tos" and Projects

Looking for write-ups of how to do specific things with an Arduino? You've come to the right place!


The "How Tos" section of this page is divided into levels according to complexity. Pages in the first (lower level) sections should be easy to read, and involve little effort or expertise. Topics which are more complex and/ or require more Arduino fluency are relegated to the higher levels. At the present time, this may seem "overkill". I intend for this site to grow; eventually you may thank me for splitting things up.

This material assumes you have a working Arduino playing nicely with the big computer you're using to program the Arduino. If you are still getting set up, be sure to see the excellent help and troubleshooting material provided at the official Arduino site. AFTER you've looked there, you can also access the helpful forums. Alternatively, I've done a guide to setting up an Arduino. (I wrote that while I was still a raw Arduino novice, so maybe I've managed to mention some of things that more experienced Arduino hands didn't realize weren't "obvious".) I also have an extended course in Arduino programming for you, if that's what you want.




Table of Contents, Arduino "How Tos":

(The "Projects" listings are further down this page.)


Level Zero How To's: (Really introductory information)

"You light up my life...": Well... maybe a few LEDs anyway. Basic information about connecting LEDs to an Arduino.

"Thank you for your input...": An introduction to connecting switches and push-buttons to an Arduino. The basics.... but they'll stand you in good stead for much work.

The Big Three: Voltage/ Resistance/ Current. You can go a long way with ad hoc answers to things, but you owe it to yourself to someday master the underlying fundamentals. This page is my introduction to those basic concepts.

Switch contact bounce: A nuisance for which we sometimes have to make allowance.



Level 1 How To's:

LCD panel: How, easily, without spending a lot of money, to connect a simple liquid crystal display panel to your Arduino, and thus provide for text or numerical output. This solution is easier to use than the "usual", "do it with software" answer. Besides saving you programming work, it also means that fewer Arduino pins are used for the display. No, you won't be able to drive a laptop screen or monitor... but you can have several lines of characters or simple graphics, easily, and cheaply.

Serial Monitor: A way to obtain text and numbers from an Arduino program, on your PC screen, without buying anything beyond the basic Arduino and installing the basic, free, Arduino development environment software.

Analog distance sensor: Interfacing an Arduino to an analog sensor. The sensor used ($26.. but see next tutorial for an alternative) measures distances (0 - 254 inches) ultrasonically. This "How To" also has general points relevant to reading any analog signal. The "How To" includes a way to make the Arduino display the analog reading on a "bar graph" of Arduino- driven LEDs.

Another analog distance sensor: An infra red sensor, less expensive, which would just "plug in" in place of the ultrasonic sensor used in the more fully explained "how to" above. Uses an IR beam, and is good for distances from about 5cm to 90cm. Will detect things from 0-5cm, but be "fooled" as to how far away they are.


Level 2 How To's:

Door monitor... and so much more: Ostensibly, this is about making a monitor to see that something stays in one place, be it a door, a valuable small sculpture, a child. However, the "how to" essay delivers a major, stand alone, tutorial about "top down design/ bottom up development", using sub-routines, something approximating a state diagram, and doing switch debounce in software. Highly recommended, if you want some lessons in how to work more productively.

Sending floating point numbers to the serial stream, and a quirk of Serial.print: How to "print" a type-double value. The "quirk" is actually a helpful feature... but it is also a trap for the unwary. Overloading. Does "Serial.print(65)" give you 65 or A? Depends on how you pass the 65 to Serial.print! But you can have the behavior you want!

Working with Binary Numbers Mostly the general theory. "Boring", but you could find concepts in the essay useful!

Radio control hobbyist servos: No "How To" for these (yet!), but I had to say something about them, having finally put my toe in that water. How easy! What fun! All of the following is about using them the simple way. You can, of course, overcome the limits implied if you "get fancy". They aren't very strong, but are capable of lots of things. With the usually-present "Servo" library, programming is very, very easy. You don't have to master "PWM"... the library takes care of that detail. You won't be using a radio link, just driving them directly over wires. Two small servos can "hang" directly off your Arduino, if you aren't putting a lot of other power demands on it. The servo will turn to (and stay at) whatever position you require over a 180° arc. (It can't "turn all the way... think of how your head works on your neck. Servos are like that, not like the mythical owl who can twist and twist.) I was tempted into buying a cheap, toy, pan & tilt head, and it is what I paid for... but still "works" enough to have fun with! Sun trackers, movable CCTV... here I come! Wish I hadn't put it off so long! See the main Arduino pages and GeekLord's Instructablefor more information.

Level 3 How To's:

nuElectronics Datalogging Shield... How to use the £11, c. $16 (7/10), shield for data logging from nuElectronics.com... and why you would want to!

1-Wire interface... How to use a $8 pre-programmed microcontroller to greatly simplify communications with the wonderful 1-Wire family of sensors and actuators. This page was heavily re-written in the first part of April 2008. Not only could it be of interest for the stated topic, but also it exemplifies communicating between and Arduino and serial devices in general. The Dallas 1-Wire family of chips open up all sorts of possibilities, including MicroLans. Read about connecting them. The discussion also speaks of the Arduino's 1-Wire Library... a different way to connect to 1-Wire devices. ("SPI" is not covered here.)


Level 4 How To's:

I have a number of pages which talk about connecting Arduinos to other instances of silicon intelligence. The first link takes you to a sub-menu of "illustrative" programs, demonstrating general principles. The other links (more to come) are to pages which discuss specific, "worthwhile in their own right" projects.

Linking Arduinos to things with serial ports A sub menu setting the stage for several tutorials, including How to speak to PC from Arduino, and How to speak to Arduino from PC.

Linking multiple devices Arduino "client/server" setups. Using a serial link to another device.


Level 5 How To's:

None yet!



Projects

(The "How Tos"section is further up this page.)


Projects: essays on specific Arduino driven systems...


Perpetual Motion: Use an Arduino, a magnet, an electromagnet and two switches to create a pendulum which never stops gently swinging. Count the swings if you want to know the time of day, but created for the fun and aesthetics of it. (Comes with complete program code.)

Access Control: An "electronic lock", driven by an Arduino. (A case study from my Arduino Course).




My tutorials about programming for the Dallas Semiconductor 1-Wire (tm) chips, as used on a MicroLan (tm), have been moved to here.. Those tutorials are written for Delphi (language) programmers, but they contain much information that would apply to other language environments. I also maintain pages which introduce MicroLans and explain the hardware.


-------------------

See Also: The Arduino programming course from Sheepdog Guides:

Further to the Arduino ideas the page you are reading now will take you to, I have posted a series of essays which try to help you become a better Arduino programmer and engineer... but, for the best result, you will have to buckle down and work your way through them in sequence. The "How To's" here can be accessed in whatever order you like.

My experience is with the Arduino Diecimila and two clones, the The Bare-Bones Board ("BBB") from ModernDevice.com and the Boarduino from AdaFruit. I've been using the Arduino Development Tool (IDE- Integrated Development Environment), on a Windows XP box since version 0010. (I'm using 0014 for some work at the moment.) Having said all that, I have confidence that the product works well across various platforms. I am beginning to use Linux, although so far I've only done a little Arduino work there (using Ubuntu).


Feel free to use this information in programming courses, etc, but a credit of the source would be appreciated. If you simply copy the pages to other web pages you will do your readers a disservice: Your copies won't stay current. Far better to link to these pages, and then your readers see up-to-date versions. For those who care- thank you- I have posted a page with more information on what copyright waivers I extend, and suggestions for those who wish to put this material on CDs, etc.





Editorial Philosophy

See the discussion near the bottom of the "top level" page covering the bulk of my Arduino contributions. There is information there, too, about things like "May I copy your material?", and the system of file names I am trying to work to.


   Search this site or the web        powered by FreeFind
 
  Site search Web search
Site Map    What's New    Search

The search engine is not intelligent. It merely seeks the words you specify. It will not do anything sensible with "What does the 'could not compile' error mean?" It will just return references to pages with "what", "does", "could", "not".... etc.
In addition to the How To articles for which this page serves as Table of Contents, I have other sites with material you might find useful.....

Tutorials about the free database which is part of the free Open Office.
Sequenced set of tutorials on Pascal programming and electronics interfacing.
Some pages for programmers.
Using the parallel port of a Windows computer.


If you visit 1&1's site from here, it helps me. They host my website, and I wouldn't put this link up for them if I wasn't happy with their service... although I was less than pleased the other day to have what I was doing interrupted by a telephone call from their sales team, trying to get me to extend my involvement. Sigh. Hardly a rare event, but I'd thought 1&1 were a bit classier that some of the people who have my telephone number.



Ad from page's editor: Yes.. I do enjoy compiling these things for you... hope they are helpful. However.. this doesn't pay my bills!!! If you find this stuff useful, (and you run an MS-DOS or Windows PC) please visit my freeware and shareware page, download something, and circulate it for me? Links on your page to this page would also be appreciated!

Click here to visit editor's Sheepdog Software (tm) freeware, shareware pages.


And if you liked that, or want different things, here are some more pages from the editor of these tutorials....

Click here to visit the homepage of my biggest site.

Click here to visit the homepage of Sheepdogsoftware.co.uk. Apologies if the "?FrmAht" I added to that link causes your browser problems. Please let me know, if so?

Click here to visit editor's pages about using computers in Sensing and Control, e.g. weather logging.



To email this page's editor, Tom Boyd.... Editor's email address. Suggestions welcomed!


Valid HTML 4.01 Transitional Page tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at validator.w3.org


Why does this page cause a script to run? Because of the Google panels, and the code for the search button. Why do I mention the script? Be sure you know all you need to about spyware.

....... P a g e . . . E n d s .....