background preloader

Arduino Tutorial - Getting ready

Arduino Tutorial - Getting ready
This lesson won't teach any electronics, really. Its more for making sure that everything is setup and ready for the future lessons. It will verify the Arduino is working as intended and that the computer you are using is compatible. For this lesson you will need some stuff! Make sure you have this stuff or you will be unable to complete this lesson Take your Arduino out of its protective bag. Diecimila Arduino Or like this: NG Arduino If there's anything missing or really wrong, make sure to contact the store you bought it from. OK, now that you are satisfied that your Arduino looks good, put the rubber bumpers on the bottom of the board. Depending on which Arduino and which OS you have there are different instructions Now we are ready for the moment of truth, it's time to plug your Arduino in and power it up. The jumper-setting step is only for Diecimila and OLDER arduinos! You'll want it set as shown in the picture above. Make sure your cable is a A-B cable. If not, double check:

Cables Arduino is great but sometimes connecting interesting things to it can be a pain. Here are some things that may make it easier for you. Here are some of the cables and pins that are available, and below we'll show you how to use them for many different applications. Here are a few places you can jump to, if you're in a hurry: For use on Breadboards many people use "jumper wires" with male pins on both ends. Many Input and Output devices (and servos, which this pinout is based on) have one signal pin plus Vcc(Usually +5V) and Ground. Here's an example of how easy it is to connect an input device (Switch) and an output device (LED) using this cable. Sometimes you need to connect to some device that is not an Electronic Brick. On the right is the YourDuinoRobo1 Arduino-compatible board. There is also a very useful cable that plugs into a Sensor Shield on one end, but has separate female sockets on the other end. You will also see three red individual wires in the photo (right).

Arduino Tutorial - Lesson 1 - Let there be blink! Ah yes, it is finally time to make your Arduino do something! We're going to start with the classic hello world! of electronics, a blinking light. This lesson will basically get you up and running using the Arduino software and uploading a sketch to the Arduino board. These instructions mostly show Windows software. Not much is needed for this lesson, just a USB cable and an Arduino. Make sure you've gone through Lesson 0 first! The first thing to do is download the Arduino software. Go to the Arduino Software Download page and grab the right file for your OS. The packages are quite large, 30-50 MB so it may take a while to finish Extract the package onto the Desktop Windows Mac OS X Double click the Arduino software icon To open up the workspace I think I get the red error text shown because I already have Arduino installed. The first step is to configure the Arduino software for the correct chip. If the text says ATMEGA8-16P then you have an atmega8 chip. Windows port selection

Introduction to using openFrameworks with Arduino Introduction to using openFrameworks with Arduino Skill Level: Intermediate by CTaylor | January 26, 2012 | 1 comment What is openFrameworks? openFrameworks is a very handy software library written in C++ that is written for the sole purpose of reducing the software development overhead faced by designers and artists that would like to create pieces that use various media (graphics, sound, video, electronics, etc.). For some great examples of projects that use Arduino and the oF libraries, be sure to check out the openFrameworks section of the Arduino Blog. Very impressive fluid dress concept by Charlie Bucket What will we do in this tutorial? This tutorial will go step-by-step through the process of installing openFrameworks, getting programs running with it and then using the oF software libraries to communicate over USB with an Arduino UNO. This tutorial assumes that: You know the programming and basic use of Arduino. Step 1: Install openFrameworks and Code::Blocks Now install Code::Blocks ...

Arduino Tutorial - Lesson 2 - Modifying the first sketch OK you've gotten your Arduino set up and also figured out how to use the software to send sketches to the board. Next step is to start writing your own sketches. We'll start off easy by just modifying something that already works. To start we will venture deep into the Blink sketch, looking at each line and trying to understand what its doing. Then we will start hacking the sketch! Start up the Arduino software and open the Blink example sketch, as you did in Lesson 1. The sketch itself is in the text input area of the Arduino software. Sketches themselves are written in C, which is a programming language that is very popular and powerful. int ledPin = 13; void setup() { pinMode(ledPin, OUTPUT); } void loop() { digitalWrite(ledPin, HIGH); delay(1000); digitalWrite(ledPin, LOW); delay(1000); } Lets examine this sketch in detail starting with the first section: This is a comment, it is text that is not used by the Arduino, its only there to help humans like us understand whats going on.

Blog ยป OpenFrameworks Makers need to familiarize themselves with the core concepts and the theory involved in creating applications such as Motion Sensing and Face Tracking. As the technology is churning out new hardware day and night, DIYers need to work hard to keep up and always be in touch with the latest technology around them. For example, anyone working with Accelerometers/ Gyroscopes or Inertial Measurement Units needs to understand the theory of Vectors, Force, Gravity and be able to work out complex mathematical problems. They may easily get an Arduino Board and an Accelerometer Breakout or an IMU Board and use a library instead of writing their own code but to truly understand the theory behind it; how the device actually works, is not for the faint of heart. One such problem is the Face Tracking Application. Unless you know the real theory behind how the Algorithm actually works, you can only wonder about that robot which follows its master. In an introductory post, Greg writes:

Arduino Tutorial - Lesson 3 - Breadboards and LEDs You've started modifying sketches, and played a bit with the onboard LED (or if you have an NG, an LED you added). The next step is to start adding onto the hardware component of the Arduino. We will do this by adding a solderless breadboard to our setup, connecting up new parts with wire. Solderless breadboards are an important tool in your quest for electronics mastery. Basically, a chunk of plastic with a bunch of holes. In the images above you can see how there are two kinds of metal strips. In this lesson, we will show pictures of both the tiny breadboard on a protoshield and also using a 'standard' breadboard without a shield. Warning! Distressing as it may sound, solderless breadboards can be very flakey, especially as they age. To use the breadboard, you'll need jumper wires. Heres how to do it with just diagonal cutters...Cut the wire first, using wire cutters Nick the insulation, then pull it off. The resistor is the most basic and also most common electronic part. Look again!

Arduino Tutorial - Lesson 4 - Serial communication and playing with data Ah, Arduino, I remember when you were just crawling around and blinking LEDs. Now you're ready to learn how to speak! In this lesson we'll learn how to use the Serial Library to communicate from the Arduino board back to the computer over the USB port. Then we'll learn how to manipulate numbers and data. For this lesson we won't be using the shield, so simply remove it (keeping the mood light LEDs on it you'd like). The shield doesn't contain any programs or data, it is just our way of connecing up the LEDs and resistors. Libraries are great places, and not yet illegal in the United States! Software Libraries are very similar. The library we will be using is the Serial Library, which allows the Arduino to send data back to the computer: Serial may sound like a tasty breakfast food, but its actually quite different. Information is passed back & forth between the computer and Arduino by, essentially, setting a pin high or low. This is as good as Microsoft Visio can do, yay! So...click it!

Arduino Tutorial - Lesson 5 We've done a lot so far, blinking lights, printing messages...all of that stuff is output: signals coming from the Arduino. The next step is to start playing with input, with the Arduino responding to outside events. In this lesson we will begin with the most basic kind of input, a push-button switch! You're probably familiar with switches, there's tons of them in your house. One kind of switch you use every day is a light switch. On the left, the switch is open and no current flows. (thanks wikipedia!) In this photo, you can see the internals of a light switch. Light switches are great but we need something smaller. These little switches are a 1/4" on each side, cost about 25 cents, and can plug directly into a breadboard. Normally, the two wires are disconnected (normally open) but when you press the little button on top, they are mechanically connected. Find 5 things around the house that have switches. Power up the Arduino and try pressing the button. Switch capability Fig 5.2 Fig 5.4

Related: