This isn't only about how to do things. It also commends some good add-ons for your Arduino. The "How To's" 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.
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.
Help "show the world" how widely adopted the Arduino is! See note below about ArduMap... a place where you can say "Arduino Spoken Here".
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.
Pins of the Arduino: Some reference notes about special properties, roles, of some pins you might have thought were entirely general purpose.
Someone Else's guide Almost all of the links to tutorials from this "table of contents" page in front of you go to more pages written by me. (And as such, they usually open in the same window.) I'm including this link to one of YourDuino's tutorials, though, as he has taken a fresh approach, which may appeal to some readers. (The link opens in a new window or tab... please come back here after going there!
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.
Eight LEDs, eight digital inputs: Sometimes Simple is Good. If you want a well made, neat "answer" to hooking up 8 LEDs and 8 digital inputs, see my notes about adapting the ArduCapSense shield. You'll pay a little for the luxury of doing it the easy way... but how much is your time worth? Kit: only $15 including p&p (USA) at 3/11.
Level 2 How To's:
Dealing with individual "bits" (binary digits): A more elegant way to do soemthing which crops up in several of my tutorials.
Seven segment LED display: Four characters. Inexpensive ($13 @8/10, + p&p) module from Sparkfun (COM-09764)... Controlled over a simple serial link. One one digital I/O line is used. (The 09765, 09766 and 09767 are similar devices in other colors.)
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 de-bounce 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 Instructable for more information.Voice synthesis: Tremendous fun! Easy. Inexpensive ($25 @8/10, + p&p)... Control a speech synthesis chip over a simple serial link. Phoneme based: "say" whatever you want to... over a speaker, or down a phone line... etc! Lots of fun possibilities. It can either be a "printer" (outputting speech) connected to your Arduino, or filled with phrases and then operated independently.
Non-blocking way to monitor the state of an input: If you don't already know about switch "bounce", or "chatter", see the simpler tutorial explaining How to read a switch, even if it "bounces".
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!
Reading an IR remote control / "Beam broken" intruder, etc, detectors: Use an ordinary remote control as a keyboard for all your Arduino projects. In some digressions at the end of the tutorial, I present some project ideas. Have fun! (If you use the library recommended, you can also send IR remote control signals from an Arduino.) The "beam broken" detector does not need a remote control handset, but if you read the tutorial, you'll see how the topics are related.
Subroutine to measure frequency This slightly atypical tutorial presents a subroutine which will look at an input, and tell you if a pulse train is present, i.e. a signal going "on"/ "off"/ "on"/ "off"/ "on"/ "off... fairly steadily... or not. It doesn't use interrupts. It will return, even if there is no pulse train. Actually, it returns the length of a full cycle, but that's inversely proportional to the frequency, isn't it? Developed in connection with the DirtCheapDumbWireless project.
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.)
RFID reader A simple guide to connecting an RFID reader to your Arduino. It is specific to the Innovations ID-20 ($35, 2/11) from Sparkfun.com, but should also be almost everything you need for the slightly less expensive ($30, 2/11) ID-12.
Eight capacitive input pads, eight LEDs... plus audio! The ArduCapSense shield gives you eight "pads" on a nicely made shield... which can also be used with Arduino clones which do not accept shields directly, due to their footprint. As a bonus, it also carries 8 LEDs, and a simple circuit to interface a digital output to an audio amplifier and speaker. Only $15 as kit with parts, 3/11.
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 "master/slave" setup: With a program running in a "master" PC, an Arduino "slave", with an LED and "doorbell" switch can be "driven" / monitored. The window on the PC's screen tells you from moment to moment whether the "doorbell" connected to the Arduino is pressed, and there are two buttons: "Turn LED On", "Turn LED Off". With a click of the mouse on the master, the PC, the LED on the Arduino can be turned on or off. The two are connected by a simple serial link. You don't NEED Delphi to benefit from the material in the tutorial, even though the PC part of it is couched in Delphi terms.
Linking multiple devices Arduino "client/server" setups. Using a serial link to another device.
Level 5 How To's:
Web server 2 A guide to connecting your Arduino as a web server to the world! with a Wiznet W5100 interface... the widely supported one. There are links from there to Arduino servers which you can play with across the net. (To set up your own, you do not need a "static IP address", if you know what that is, and it is worrying you.) With the web server described, you can supply a Pachube or ThingSpeak data stream source. (This is covered in the ArduServer.com top level page.)
Web server.. the original Another guide to connecting your Arduino as a web server, similar to the one above. This uses an ENC28J60 interface... the old, inexpensive, less widely supported one. Cost of project: About $40, including an Arduino clone to be dedicated as the server. ($40 on top of things which I imagine you already have.) This can also serve Pachube or ThingSpeak. (This is covered in the ArduServer.com top level page.)
PCSensor.com TEMPerLAN This "tutorial/ how to" is very atypical. At the moment, the link takes you to something which at first doesn't seem to have anything to do with Arduino work, and in fact the first part of the page doesn't have anything to do with the thing related to Arduino work! But if you scroll down, you will find anguished rambles regarding my experiences with the TEMPerLAN... a neat little device, which does seem to work(!), but which at 9/11 is, my view, let down by limited documentation and software.
But! Follow the links, and my software for the TEMPerLAN will also allow you to access my ArduSimpLan, subject of the next tutorial. So... if you are interested in the programming of a client, to run on a PC, to talk to an Arduino simple (not html) server, you may still find it worth reading through the TEMPerLAN material! (TEMPerLAN is not covered in the ArduServer.com top level page.)
ArduSimpSrv A simple Arduino Server. Not all servers are web servers! This tutorial explores an alternative. The good news: Your Arduino won't have to dish up HTML, so the complexities of that are avoided... leaving room for doing more.
The bad news? You'll need a dedicated client program to read what the server makes available. One is provided for Windows users, and instructions for writing your own, too.
An ArduSimpLan can be accessed from anywhere on the internet, if you configure your LAN as needed. (The configuration for that is a general matter of LAN admin, regardless of whether it is a ArduSimpSrv you are making available, or something else. The details are covered at my FarWatch pages... but you don't have to set up the Apache server, or have an always-on PC... the ArduSimpSrv will be the always-on server. (Oh! You will need an always on PC to take care of keeping your DynamicDNS service informed of your changing IP address, unless, as may well be the case, your router or an IPCam on your network can take care of that. Sigh.) (ArduSimpSrv is covered in the ArduServer.com top level page.)
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.)
Burglar Alarm: At the moment, that link takes you just to some Arduino sourcecode. I will write one of my tutorials for you in due course. (A draft is well along.)
Access Control: A simple little thing. But completely secure and useable... just not very big! Might be worth looking at, just for general ideas in it, even if you don't need an electronic lock. Easily adapted to add features.
Access Control: A huge essay, lots of tutorial material, fancy "electronic lock", driven by an Arduino. (A case study from my Arduino Course).
The "BreakWire LAN": This essay doesn't tell you "all about how to do it", but it does present some of the basics for creating a little LAN that would allow you to connect Arduinos to one another, to "talk" on a LAN. A "big" PC could be on the LAN, too.
Color-aware line follower: Ever been in a huge public building, say a hospital, where the administration has put colored lines on the wall to help you navigate? "Follow the red line for emergency exit", "follow the green line for cafeteria", "blue line for billing", etc? Someone must have thought of the following project already, but I haven't seen it elsewhere before 2 May 2011, and still not at 15 September 2011. But it would be a fun project for you. (I haven't built one, just dreamed it up.) For many years, "line following" robots have been around. This idea extends that a little. The robot would operate in an arena with a white floor and SEVERAL lines on it... in different colors. Near the edge of the arena, a black line all around it, like a "fence". The robot would follow the line of the color you tell it to. If you tell it to change to a different color, it should be able to seek the line out, turning back whenever it reaches the "fence", rather than going off the edge of "the world." The Sparkfun Color Light Sensor - Avago ADJD-S311-CR999 ($5 at 5/11) is a very clever sensor for this. BEWARE, however... It is a 3.3v device. The programming to read from it is not trivial. And this thing is TINY, and you'll need some very tricky soldering, and a PCB, if you buy just the sensor. Happily, Sparkfun offers one on a breakout board! ($15 at 9/11 + p&p). (One of you, Gentle Readers, should make a present of one to me, and remove the temptation I am feeling. Until just now, this paragraph talked about "it would be nice if Sparkfun put the sensor on a breakout board". I only went off to the site, and into temptation's way, to keep this page current for you!!). If you can't face the fancy programming, or the 3V3 requirement, how about interfacing your Arduino to three AmbiLight sensors, with color filters, anyone? Or one plus a filter changer? (If you undertake this with a mere phototransistor, be sure to use one with a good response to a wide band of frequencies. Many are almost color blind, "seeing" just one color.) (Of course, the Arduino Uno has a 3V3 output, and you'll need another Arduino to drive the sensor, anyway, so what better excuse to buy an Uno, in the same order as the sensor on the board?? (Uno: $30, including onboard serial-to-USB i/f.)
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.
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.
There are many! That is part of the reason I am so enthusiastic about the device.
Suppliers: I like Sparkfun, ModernDevice and Wulfden, all in the US. There are other good ones, they're just the one I happen to use. (I came across Emartee in September 2011. While I haven't used them yet, they seemed to have some good stuff. There are other people who sell primarily via eBay. You have to remember that there are many Arduino-friendly devices which are not only good with Arduinos.
Sparkfun in particular has both a good user forum and a means of adding comments and discussion to each product's page. Of course, as Arduino is such a good fit with 1-Wire, my preferred 1-Wire suppliers are also, by association, "Arduino suppliers".
If you like the sort of little "How To's" this page is index to, or if you want to buy some useful kits of things that interface with Arduinos, you could do worse than to visit Peter Anderson's Arduino page. He is a university lecturer whose involvement with hobbyist electronics goes back (like me) to the "parallel port is cool" age. It was an off-hand "this might be fun" remark by him about the Arduino, which he was just starting with at the time, which got me into Arduinos, for which I thank him... I think. (My Arduino play hasn't helped progress on the things I "ought" to be spending time on. Sigh.)
At Peter Anderson's page, besides, as I said, a PayPal based source of components and kits, you'll find hardware notes and Arduino code for the following, and probably more. The list below was harvested and edited in September 2011. Check "the horse's mouth" for current offerings.
(The last item, the Melexis, is a neat little device which can tell the temperature of something from a distance, from the IR radiation it is giving off. Cost: About $17. Slow scan infra-red cameras, anyone?)
If you dig around his site, you'll find other goodies, too.
Moving on to other Arduino suppliers...
In September 2011, I had excellent service in the UK from Hobbytronics.co.uk I ordered an Ethernet Pro (they were out of stock in several places), online, painlessly (only PayPal accepted, if that's an issue for you) mid morning Saturday. It arrived Monday! (I hadn't paid for expedited shipping.)
The YourDuino shop has sundry bits and pieces, either nicely mounted on modular carrier boards, or as raw components. (They also sell Arduinos and clones. And they have some tutorials which avoid being "heavy").
In Australia... and all of these people will ship, and for electronic parts, international mail can be very good... there is http://www.freetronics.com/. I haven't (yet!) used them myself, but their site is well worth a visit, at least.
Even if you don't end up buying from them, pay a visit to the good people at Cooltronics in the UK. They have outstanding product description pages, for instance the one for the Arduino Ethernet. That page gives you better technical information that the official Arduino site, last time I looked! (The Arduino Ethernet, by the way, is available with or without the PoE module.)
On July 8th, 2012, if you went to ArduMap (http://www.guglio.net/ArduMAP) you might think there are two Arduino enthusiasts in the UK, five in the US. Not so! (Go along to the Sparkfun forum, if you don't believe me.)
Now... I would be the first to caution giving away personal information online, but I've had my "details" listed at ArduMap for many months now... no regrets.
ArduMap is a fun idea, creating a map of the world with flags for the general location of participating Arduino enthusiasts.
(Details for anyone who decides to go ahead...)
ArduMAP: Yes, you do have to register... so that you can be "given" a flag that you control! Allows fine tuning, e.g. the British person who is, geographically, in the US can have a British flag. The registration process asks for your Arduino forum user id. This is a four digit number which you will find in the URL if you go to your forum profile page.
There's another user map at maps.google.com, called "Arduino User Map", created by Arduino forum users Mowcius", and I think that's his Google ID, too.
I've used the Google "make your own map" in the past... have some idea of what i am doing, but was totally unable to put a pin for myself on the map without linking that pin to everything else I do in every corner of Google. And remember: Google is constantly growing. Your "private" account over at SomeObscureForum.com might today be a safe place to discuss details of collecting the kids after practice with the other soccer moms... but when Google buys the site...? The introductory video... why can't I just get some text to read?... about why maps you make yourself on the Google Maps site is presented by a pretty young thing that wants to tell the world her favorite bike trails in the backwoods of Colorado. Excuse me? I hope she's lying, lives in Brazil, and never goes near a bike... but if so, I am disappointed in Google.
Back to the pros and cons of using the Google Arduino map: It would appear that anyone logged in with a Google ID can move any flag! (And if you aren't logged in, it would seem that seeing the map at all is hard.) But, as I say, I backed away from that map pretty quickly, on Identity Leak concerns. (Leave a $5 bill on the sidewalk, and sure, someone will steal it. Identity "theft" is not always hard, when people are careless. The Great Phone Hacking Scandal in Britain was wrong, but what the bad people did was hardly what I would flatter with the name "phone hacking".)
Before I backed out, I was in a strange situation where it seemed I couldn't remove the pin I'd placed for myself... but that may have been AKC syndrome. (Ante- Keyboard- Clot). One or the other of the above may explain why some user's pins are in the middle of oceans.
One way to get there... I think... is via....https://maps.google.com/maps/ms?ie=UTF&msa=0&msid=106367500863692290311.00048bf511125d88d5fc7. Whether that will work may depend on whether you are logged into Google.
Take a moment to visit my http://Flat-Earth-Academy.com? It aims to help kids (or adults who missed out in school!) interested in science know what the questions are, to attain a "basic framework" of knowledge on which they can build a good understanding. No "sugar coatings"... just some concentrated Good For You stuff. There must be SOME people left who aren't afraid to "work" their way to the expansion of their knowledge? Mention it in any relevant forum you visit, please? (Opens in new tab or window, so you can get back here just by closing it.))
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.
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.
Click here to visit editor's Sheepdog Software (tm) freeware, shareware pages.
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.
Page tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at validator.w3.org
....... P a g e . . . E n d s .....