原创 A quest to learn the Arduino (Part 1)

2013-10-9 15:10 1644 7 7 分类: 消费电子

As you may recall from my blog I must learn the Arduino fast, I'm currently on a quest to learn the Arduino. There are a number of reasons for this, including the fact that I typically have several hobby projects on the go that could benefit from the addition of a microcontroller.


I've actually been meaning to learn the Arduino for some time, but there's always so much to do and so little time to do it all in. The reason I was spurred to action is that I recently purchased a do-it-yourself 3D tri-colour LED Cube kit that is powered by an Arduino-compatible controller.

 

 

As an FYI, I finished building this little scamp a few days ago and it worked first time (this resulted in my performing my "Happy Dance," as you can well imagine). I'm now having a great time creating programs for this little beauty. I'll be talking about this in more detail in a future blog.


Another reason for my wanting to learn that Arduino is that I sponsored a Kickstarter project for a fast and easy-to-use machine vision system called the Pixy, which can be connected directly to an Arduino. And yet another reason is that I also sponsored a Kickstarter project for a little hexacopter drone that you can fly using your smartphone or tablet computer. Guess what? This little rascal is also powered by an Arduino-compatible controller.


Just what is an Arduino?
Now, you may know all this, in which case you can simply ignore this next bit. The thing is that a lot of folks are a little fuzzy about some of this stuff, so it's worth our time to take a few moments to ensure that we're all tap-dancing to the same drum beat.


The term Arduino refers to an open-source, microcontroller-based platform that's based on easy-to-use hardware and software. These platforms come in all sorts of shapes and sizes. A very common system is called an Arduino Uno, which features an 8bit microcontroller and which can be powered by a USB cable, a battery, or an external power supply.

 

 

You can pick up an Arduino Uno for only $13.99 from Amazon (click here). If you do purchase this stand-alone unit, then I would also recommend purchasing an external power supply for $5.98 (click here) along with a USB-A to USB-B cable for $5.09 (click here).


Note: Buying stand-alone Arduinos is great if you already know what you are doing and you simply want to build them into your projects. If you are a complete beginner, however, you might want to consider purchasing a kit that includes an Arduino plus a bunch of other stuff. We will be talking about these kits in more detail in the not-so-distant future.


Creating programs is really rather easy. You use the free Arduino IDE (integrated development environment) running on your main computer to capture your program, which you then download over the USB cable into your Arduino (we'll be talking more about all of this shortly). Your program is stored in Flash memory on the Arduino. This means that, once you've downloaded the program, you can disconnect the USB cable if you wish. And, even if you remove power from the Arduino, the next time you power it back up again, it will remember—and run—the last program you loaded into it.


Observe the two 16-pin connecters—one on either side of the Arduino Uno board—pointing upwards in the image above. These provide inputs and outputs that allow the Arduino to "talk" to the outside world. Devices called sensors can be used to observe what is going on in the physical world (temperature, pressure, light, sound...). They translate this information into electrical signals that can be used by an Arduino so it knows what's happening around it. Meanwhile, devices called actuators can take electrical signals and translate them into actions in the real world, like activating a switch or a motor.


One really cool Arduino-related concept is the fact that anyone can build a daughter board—called a "Shield—that plugs into the connectors on the main Arduino board. These Shields can carry all sorts of sensors and/or actuators. In many cases it's possible to stack multiple Shields on top of each other. You can purchase off-the-shelf shields for things like Ethernet, Wi-Fi, Wireless, Motor Controllers, and so forth. You can also purchase special Prototyping Shields that facilitate you building your own projects.


There are all sorts of Arduino-compatible devices and Arduino clones powered by anything from 8bit to 32bit processors and boasting all sorts of capabilities. For example, Intel has just announced the Galileo, which—at the time of this writing—is the highest-performance Arduino-compatible development board currently available.


In fact, it seems like Arduino-related articles and projects are popping up all over the place these days. For example, I just saw a Kickstarter project for something called a Microduino. This is a small, stackable Arduino-compatible board—accompanied by a suite of Shields—that's about the size of a quarter. The following image shows a Microduino next to a quarter, both of which are presented next to an Arduino Uno:

 


Meanwhile, the image below shows a close-up of a Microduino stacked on top of one of its Shields (you have to admit that this is rather tasty):

 


OK, I think that's enough for today. In my next column I'll be talking about some of the resources available to help one learn how to create programs for, and how to use, the Arduino, including books, kits, and online resources. In the meantime, how are you finding this mini-series thus far? Do you think it's interesting? Are you learning anything (please say "Yes")?


 

文章评论0条评论)

登录后参与讨论
我要评论
0
7
关闭 站长推荐上一条 /2 下一条