Two weeks ago, we ran a Getting Started with Arduino book giveaway on our Make: Arduino page. If you’re not familiar with our Getting Started book, it’s the perfect introduction to Arduino, setting up the hardware and software, and doing the first few experiments to get Arduino to interact with the world around you.
We had a great response to the giveaway, with 397 comments. Some were questions, some were fellow MAKE readers (and some staff members) answering those questions. We thought it’d be cool to wrangle the best Q&A into an article that we’ll keep on on Make: Arduino page for future reference. If you want to see the raw conversation for the drawing, it’s here. And there are still plenty of questions on this page that remain unanswered. If you know Arduino, please help your fellow makers by answering a few, if you can.
Getting Kids Started coondognd: What’s a good age for a child to start using Arduino? I have some young’uns, and don’t want to start them too early and scare them off if they can’t quite grasp it.
Hugo Estrada: I think it depends on the child, but I have shown projects to my 8 and 5 year olds. They even find the LED blinking to be great. Just be ready to take over the project if they seem to lost in it. They will enjoy themselves even if all what they are doing is watching you work on a project and asking questions. Let them compile the programs and load it to the Arduino. Even a minimal involvement makes them happy and makes them feel like they contributed.
My personal belief is that young kids will remember whatever they were exposed to when they were little with fondness. So the earlier you expose them to electronics or programming, the more they will have that fuzzy connection for the rest of their lives with the subject.
The Lilypad Arduino on the Frogr e-textile Shield
Darrick Murphy: Are there any girl-centric projects that I could use to get my daughters interested in Arduino?
Leif Burrow: Google “LilyPad Arduino”
Father-Son Bonding with Arduino norbtek: I always wanted to know about Arduino but was too afraid to ask because I am one of those people that some of my friend and co-workers expect to know about things like this. Plus I am Arduino curious and want to teach my son some old school style tech hacking. It would make for a good father-son geek bonding opportunity.
Which Arduino to Get? Matthew Perks: I can’t even decide which board to get to start playing around on, or which would be the best first project.
Matt Richardson: I would recommend you start with the Arduino Uno, it’s the most standard and up-to-date board. It’s also compatible with pretty much all the shields out there. Helping you find a first project would be tough. I pretty much played around with the components in a getting started kit for a long time. When I was ready to get more advanced, my first project was hooking up the Arduino to a receipt printer to print my Twitter @ replies. I would say play around for awhile and see what area interests you.
Getting Back Into Electronics via Arduino Paul Wittine: I used to repair computers in the Navy in the 80s. Have not done a thing with electronics since. The Arduino looks like a great place to get started again!
MikMo: Arduino is a great open source platform for learning to work with microprocessors, general electronics, senors, and controlling motors and a million other things. But the greatest of all the many Arduino values is the community that has formed around it. There are thousands of people who share their knowledge with each other.
Start Simple, Ramp Up Mark: I have a need to precisely control the speed of a diesel generator. While this may sound trivial, it’s not, and it’s expensive to have the injection pump recalibrated. Currently, I have the throttle locked to a specific spot, which works sorta well. I was looking for a way to control the throttle electronically, when someone suggested using a Arduino.
My ideas are pie in the sky… automatically start the engine… read fuel, water, oil, and current sensors… manage throttle… and, if anything goes wrong, shut the engine off. I’ve never programmed ANYTHING before, and this looks like a daunting task, but I think I’m up to it. For me, hardware is easy… the tricky part is the software. My Arduino is in the mail, and I already have a basic layout of a sketch. Now, I just have to figure out how to get it done. Suggestions?
riley porter: My suggestion is do not start with that project. Start with easy projects.. Get the MAKE book and go slow. Then read more blogs/tutorials and move up.. Next thing you know, you will be able to use a light sensor or perhaps a rotational encoder to measure “RPMs”.
The Netduino Mini
Consider the Netduino Jonathan Kim: As a computer programmer with no electronics knowledge, how easy will it be to learn to build and program with Arduino? I always wanted to get into hardware programming. Would like to build my own gadgets.
Thomas Sloan: What language(s) do you know? Arduino’s language is based off of C\C++. I program in .Net (C#) and so went with Arduino’s cousin, the “Netduino.” The Netduino uses Microsoft’s .Net Micro Framework and I’ve found it incredibly powerful. I have done everything from the simple blinking of a LED to turning on and off my lights with x10 modules. Right now my Netduino is being used to open and close my garage door using my Android phone as the remote. I’m looking to get into Arduino though as it has more of a user community and more shields (for now anyway, Netduino is catching up in both those areas).
Arduino and CNC-control Miguel: Can I use an Arduino to control a 3 axis CNC?
riley porter: Yup, you can now. http://blog.makezine.com/arduino/grbl
Shields and Libraries Michael Durham: How does the Arduino interface with other stuff like digital displays, keypads, and other inputs other than just on/off?
Thomas Sloan: On the hardware level they use what are called shields. Basically they are boards that usually plug on top of the Arduino and then the device plugs into that board. On the software level, I seen libraries that are written for interfacing with the devices that you include in your code. Google “Arduino Shields” to find out about some of the different shields that are out there.
Reusing Arduinos Tim Canny: Can you reuse an Arduino controller or is it pretty much a one and done situation?
MazinBenny: You can reprogram and reuse the controllers over and over. That’s the beauty — you can easily prototype/change/extend your projects — and if you end up building something good enough to keep for posterity — just buy another controller, since they are so cheap. If your project was more of a gee-whiz fun thing, and isn’t needed long term, then by all means, reuse the Arduino in your next project!
Who’s the Competition? squigglytail: Who are Arduino’s competitors?
Leif Burrow: The Parallax Propeller is a big one in robotics circles. That one almost straddles the line between microcontroler and single board computer though, in fact. it is also used to make hobbyist game consoles and various retro-computers.
PIC is the big one in the other hobby markets.
TI has the MSPP430 value line. They are not as powerful but they are going after the hobby market by trying to undercut everyone’s prices. They are cheap.
I don’t think I would count the BeagleBoard among Arduino competitors. It’s really more of a single-board computer, most of them end up running some form of Linux.
MazinBenny: More traditional microcontroller manufacturers… the first that comes to mind is the Microchip PIC. They make many dev kits for use with their microcontrollers and were probably the king of the hill before Arduino came along and stole the party. Many people also work with the Basic Stamp. A new competitor that is gaining traction is the BeagleBoard — since it has a much more powerful microcontroller on it, it can handle a lot more.
Using GPS with Arduino Hugo Estrada: Are there guides on how to make a GPS tracker with an Arduino?
MazinBenny: In fact, there are pre-made shields for this, like this one from ladyada: http://www.ladyada.net/make/gpsshield/
Arduino Telnet Client? Chris Lee J: Is it possible to build a telnet client using Arduino? I want to create a wifi network-based device controller.
riley porter: Thats just what I did here: https://www.synthetos.com/blog/projects/antennabot/. However I did not finish it completely. But you get the idea.
Beginner Tech Questions:
Analog Vs. Digital Pins? Hoover: What’s the difference between the analog pins and the digital pins?
Leif Burrow: An analog pin can be used just like a digital pin however it also has an analog mode. If used as an analog input it can measure a voltage between 0 and the supply voltage. This is great for using analog sensors. As an analog output it outputs pulses where you can control both the duration of and time between each pulse. This is good for controling servos, dimming LEDs and more.
Can You Make Simple Music with Arduino? The Drum Kit Kit turns your Ardunio into a… well a drum kit
Lisandro Peralta: How can you make music/create interfaces/instruments with Arduino?
MazinBenny: The PWM (Pulse-Width Modulation) pins make it really easy to interface with a piezo to make simple tones.
What Chips are on the Arduino board? Steven Giron: What are the primary chips on the Arduino? Where can I get a schematic of the boards & chips?
Duncan Murdock: The two main chips are the USB interface and AVR microcontroller. On the Duemilanove, that’s the FTDI FT232 and ATMEL ATmega328, respectively. On the Uno (newest version) that’s the ATMEL ATmega 8U2 and ATmega 328, respectively. Schematics of the boards are all on the Arduino website, but just in case, I’ll link a few here.
NG/Dicemila: http://www.arduino.cc/en/uploads/Main/Arduino-Diecimila-schematic.pdf Duemilanove: http://arduino.cc/en/uploads/Main/arduino-duemilanove-schematic.pdf Uno: http://arduino.cc/en/uploads/Main/arduino-uno-schematic.pdf Mega 2560: http://arduino.cc/en/uploads/Main/arduino-mega2560-schematic.pdf
Can Arduino Send Signals to a Display? GCF: How does the Arduino handle sending signals to a display? Does the display need its own chipset?
Leif Burrow: Without a chipset, the display requires a lot of pins. So long as you don’t need many pins for the rest of your project you can get really cheap 2 line LCD character displays this way. For a bit more money, you can get a display with a chip and it only requires 1 Arduino pin. (They say 3 but the other 2 are power and ground).
peter: How do I attach the standard 16×2 LCD display without soldering? (LCD display: http://www.makershed.com/ProductDetails.asp?ProductCode=MKAD15&CartID=1)
Matt Richardson: You’d want to at least solder those header pins onto the board so that you can put it into a solderless breadboard. Then you can use jumpers to connect the Arduino to the LCD. As a matter of fact, my first crack at soldering was putting header pins on an LCD, and it was a lot easier than I thought it would be.
Gene Kaufman: I have yet to build an Arduino project, but I have an idea that involves storing at least 6 numbers between uses. I’m thinking about using an SD card. And my display will be 4 2-digit numbers, 2 3-digit numbers, and at least 2 LED indicators (only one of which would be lit at a time). There’s also a need for 2 buttons and some type of reset capability. I’m a web programmer, so the actual logic that will be used is all pretty clear in my head, but I don’t have any idea about how to read/write to the SD card (if that’s even the best alternative), or how to drive the display (also: 7-segment LED’s vs. LCD?). Is this all covered in this book?
Leif Burrow: I believe there is a library for reading/writing to an SD card. On the hardware side you would probably use the serial interface which involves just connecting a few pins. One way to get a socket for it is to get a mini/micro sd to fullsize sd adapter, solder wires to the adapter and use the smaller device. Sparkfun also sells a breakout board with a fullsize sd slot on it. Or.. you can remove the socket from a cheap SD card reader.
But… why do you want to do this? There is already an EEPROM built into the chip. Space is limited but from what you describe should be a non-issue. Try this: http://www.arduino.cc/en/Reference/EEPROM
From Prototyping to Finished Embedded System A.Mac: I work in the specialty coffee industry and I’d love to develop a new espresso grinder. Is there much work involved in moving from using the Arduino in the prototyping stage, to using just the chip in the final project?
Leif Burrow: No, not really. Here’s one way to do it: http://arduino.cc/en/Tutorial/ArduinoToBreadboard. Of course you could just program the chip in the Arduino board then pull it out and place it in your project. Here’s all you need if you don’t mind running it at only 8Mhz http://hcgilje.wordpress.com/resources/arduino-standalone/. Or.. here it is at full speed: http://electronics-hobby.com/blog/viewtopic.php?f=8&t=4.
Dunyas: I’d love to get into Arduino. I guess my big thing is making a permanent project. How possible, easy, and cheap is it to remove the Arduino from a project once you have it done?
Duncan Murdock: Very! You can use a vanilla ATMEGA168 or 328 programmed with the Arduino bootloader and your sketch, with a few other components, to replace the Arduino. More info at http://www.arduino.cc/playground/Learning/AtmegaStandalone and http://arduino.cc/en/Tutorial/ArduinoToBreadboard.
Thomas Sloan: Awesome! I have been wondering the very same thing. I have a project that needs a more permanent solution the a Arduino. Basically I don’t want to have to buy a Arduino each and every time I finish a project (and I doubt my wife would be very happy if I did either). Looks like a Arduino and the ATMEGA chips are the way to go.
Making Your Own Arduino Boards
A homemade Arduino board from Let’s Make Robots
Brian McNamara: Can I make my own Arduino boards? I’ve seen the board layouts on the Arduino site but what about the firmware on the micro?
riley porter: Yes you can. The “firmware” is available right through the Arduino IDE. You need an AVR programmer. (You can use another arduino to do this.. however I have never done it.) Hook up that programmer. Connect the Arduino to a power source and then click the option that says “burn boot loader.” That’s it..
Talking to 802.11b and 80211.g Joe Tacconelli: Is there a way to communicate using wireless b or g?
riley porter: I have not used it. But yes there is. http://www.junetrading.com/product_info.php?products_id=5804
Using Arduino as an ATMega programmer? ChrisBarthol: Can you use the Arduino as an ATMega microcontroller programmer and would you even want to do this? Or is getting a dedicated programmer the way to go? Would the board work with other Atmel chips? That’s more than one question but I guess I have quite a few.
Duncan Murdock: I’m not sure what all is supported, but the ArduinoISP sketch under File -> Examples -> ArduinoISP turns the Arduino into an AVRISP programmer. More info, including circuit diagrams can be found at: http://arduino.cc/en/Tutorial/ArduinoISP.
Hooking Up Buttons lightforms: How many buttons can I hook up to an Arduino? What is the best method? I need to be able to register more than one button push at once.
Dagobahsystem: Directly you can hook up as many buttons as you have free digital pins. (you could probably even get creative with an analog input to accommodate a switch also) If you need more, using some external logic gates or even an FPGA might help with that.
As far as reading more then one button at a time, this can be tricky. On a small scale what I’ve done is written one routine (is that an old term?) that reads the states of all the button and stores the result in their respective variables. A second routine that reads all the variables and takes the appropriate action based on the state of the variables. I have to assume if you had a TON of button inputs you may run into processing speed issues especially if you are using a software debounce on the inputs. There is probably some fancy Arduino-thing that can handle this better but this is probably the approach I would take.
read button 1 if pressed button1_var = 1 else button1_var = 0 read button 2 if pressed button2_var = 1 else button 2_var = 0 read buttton 3 …button 4…button 5 etc…
//deal with the state of the variables
If Button1_var = 1 Do whatever button 1 does else do nothing if button2_var = 1 Do whatever button 2 does else do nothing
Reading Text Files from an SD Card Jim Cavera: I’ve a project idea, but it would need to read a couple of text files contained on an SD card or some similar flash media. Since I don’t feel like reinventing the wheel, is there a simple file system that has been written for doing this sort of thing?
Duncan Murdock: Yes, more info can be found at: http://arduino.cc/en/Reference/SD
Roland: What is the smallest & simplest way, hardware-wise, to interface an Arduino with a C++ or Python program using the OpenCV computer vision library? The application is a camera-enabled, automatically locking/unlocking/opening/closing door using face detection & recognition for human, canine & feline family members.
riley porter: Using the built-in serial port on the Arduino. Offload all the processing of OpenCV onto your computer. Then once it is required, send something as simple as an serial text message “UNLOCK” to the Arduino board that triggers a relay, etc. Keep an eye on Make: Projects as I am going to be writing a “Talking to Arduino with Python” tutorial as some point soon.
Hooking Up a Mini Linux Box Josiah Ritchie: I’d really like to know how to hook up to a mini Linux box that is running a serial port and issue commands to and receive information from it. The box doesn’t have a USB port or video ports. It is actually a small wireless router running Linux and the serial pins are just pins not a port.
riley porter: Is it TTL Serial? 3v3 or 5v5? It’s really easy if there are only pins. Once you determine what voltage the USART (or serial port) on the Linux box is running, hook the TX from Arduino to RX on the Linux box. Do the opposite for the RX line and hook up both ground lines together, and viola, there you have it!
Also I did something similar here: https://www.synthetos.com/blog/openwrt-router-station-pro-arduino/
bjepson: The PowerSwitch Tail (http://www.makershed.com/ProductDetails.asp?ProductCode=MKPS01). is a good way to switch mains voltage with Arduino. Another option is to pick up a remote controlled power switch (like http://www.amazon.com/gp/product/B0020ML762). disassemble the remote control, and use relays to switch the buttons from Arduino as I did above (http://www.flickr.com/photos/bjepson/5344937372/in/set-72157625796512226/)
Real-Time Operating System (RTOS) and Arduino Efren Cruzat II: Is there a FreeRTOS port for Arduino?
bjepson: I don’t believe the microcontroller in the Arduino would be able to support FreeRTOS. Contiki is a possibility, though I haven’t tried it: https://github.com/zxombie/contiki-arduino#readme
ICSP: What Have You Done for Me Lately? Shane Thomas: What the heck does the ICSP do for me on the Arduino?
Ethan Dicks: The ICSP (In-Circuit Serial Programming) is how you can program a blank AVR microcontroller to install the “bootloader” (the program that comes on a ready-to-use Arduino that knows how to load your programs (sketches) over the USB/serial port). You can also update the bootloader on your working Arduino with a newer or different version, though that’s not often needed. Lastly, if your project is so large that you are filling program memory, you can dump the bootloader entirely and load your entire program over the ICSP port.
You’ll need a programmer of some kind to use the ICSP port. The USBtinyISP is an inexpensive ($20) way to go these days, but there are older programmers you can make from scratch if y ou have a real parallel or real serial port on your machine. Once you have a programmer attached to your ISCP port, ‘avrdude’ can get your new/replacement bootloader or your application directly onto the chip.
Most Arduino users never touch the ICSP port, but if you start to build dedicated AVR-based projects, it’s quite handy.
Does the Gecko Know About Arduino? Karl Bunnell: Can Geico save you 15% on car insurance? More importantly… Can a Arduino home automation controlled system save a home over 15% on power consumption?
Impressing Charles Kantz’s GF Charles Kantz: How can I impress my girlfriend with the Arduino?
Leif Burrow: Make her an edge lit card for her birthday or a holiday. http://www.evilmadscientist.com/article.php/edgelitcards. Use the Arduino to add some movement by alternating 2 or more of the layers on and off. Also, add a small thin speaker and use the Arduino to play a tune. If you wait till Christmas here’s something to get you started: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1289778011.
Rob T Firefly: Dammit! I was going to ask that question; how can I impress Charles Kantz’s girlfriend with the Arduino?
To Infinity Nick: What is the max power (W) draw of an Arduino?
Leif Burrow: Infinite, but only once and only for a brief moment.
How to Rile Propellerheads Jani Pönkkö: Were there any open rivalry of jealousy from other microcontroller development platform developers once the Arduino started to get more followers?
Leif Burrow: Just mention Arduino at a Propeller Expo.
More: More Make: Arduino coverage