The Arduino’s strength is that it can do some fairly powerful things with relatively simple programming that even non-programmers can master. If you are just getting started, go to the main site to read about it, then download the free software and go buy a basic starter kit from someone (two of the major US suppliers are AdaFruit, which sells a US$65 Starter Pack, and Sparkfun, which sells a more complex Inventor’s Kit for US$100). While a basic Arduino Uno costs around US$25, it’s probably a good idea to buy one of the kits that includes an Arduino along with various resistors, LEDs, sensors and other things to play with.
And if you don’t think you can program, give it a try. You may be surprised.
Of course, programming can be frustrating at times, when something you think is obvious just won’t work. But there’s a large community of people who use Arduinos for fun (see the main Forums and other places), and they’re often willing to help someone past a rough spot. Just remember not to take any frustrations out on them. They’re trying to help.
The other thing that makes Arduinos so powerful is the idea of a library. This is nothing more than a collection of software someone else has written to do some fairly basic function that requires more complex software (or is something everyone wants to do, so it saves people having to re-invent the wheel each time they need one). There’s a list of Standard Libraries on the main site, and if you search the Internet for some specialized topic (include keywords like “arduino” and “library” in addition to what you want to do) you may find a number of others published on GitHub or elsewhere. Of course, these other libraries can vary in quality rather extensively, from the professionally polished to the completely broken. But they’re free, so if they work for you, you win, and if they don’t you’re only out some time.
I like to hope my libraries are closer to the “professionally polished” end of the scale, but I’ll note that this is my hobby, not my job, and once I get a library working for some specific task, I don’t necessarily test out every way it can possibly fail. You can ask questions or send me bug reports, either via github or the address on my About the Site page, and I’ll try to help, but I can’t promise I’ll have time to fix bugs (certainly not promptly). As it says in the library header file: they’re offered as-is, and not guaranteed to do what you want, or even work.
That disclaimer out of the way, here are what I’ve published to date. I may have other things in a work-in-progress state that aren’t published, and those will be discussed on my Musings section, but I usually don’t put the code out until I’m satisfied that it works. When I do publish code, unless otherwise noted I do so as Public Domain. In part because that fits the Arduino philosophy of being useful and having fun at minimum cost, but also because I’m not interested in making a business out of software. If someone finds my code useful enough to incorporate in a product, more power to them. But please read the comments in the code before doing so; some of my libraries may use software that has more restrictions. Most of what’s out there is under the MIT License, which is pretty easy to live with (it maintains copyright by the author and requires acknowledging them, but allows any use), but some people publish Arduino code under some form of the GPL License, which is much more coercive. I’ve so far managed to avoid any GPL code in my libraries, as it would force me to use a more restrictive license on that library.
My software is published on GitHub, under the KensCode name. So far, I’ve published the following libraries:
The LinesideSignal library is a collection of routines for using a software technique called Charlieplexing to drive more LEDs directly off an Arduino than it could normally power, by powering them intermittently but often enough so that they seem to be continuously lit. The routines are arranged to make it easy to define sets of LEDs as signals or signal “heads” and do things like “set signal 7 to red”. There are other ways to do this using external multiplexing chips, but Charlieplexing just requires LEDs, resistors, and some care in how you wire them. I don’t have a specific Musing about this library, but it is described in a post I did about Signals.
The TrainMotor library provides a collection of routines designed to work with several common motor controller shields for the Arduino (and could be customized for others, if you want). The Arduino itself doesn’t provide enough power to run a model train, but a motor shield will. Usually these support up to two small DC motors separately controlled, suitable for N and single-engine HO scale trains. I know of one person who used this to make a hand-held throttle for a small layout. This library was described in a post (here). I’d also planned a more complex Tram Controller, but bogged down in some of the more complex programming, and haven’t yet finished it.
Note: TrainMotor is specific to the original ATmega family of Arduinos (including the Uno). It won’t work with the newer Cortex Arduinos (the Due or Zero) because those have very different pin interface registers, and I had to work directly with them for some of my PWM control.