3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Beginning Arduino (Ports, Pins and Programming)

Beginning Arduino (Ports, Pins and Programming)
All right, so I am learning the art of Arduinoing and thought I'd take you along for the ride...

In this tutorial: 
Pins -- the holes on your Arduino and how to use them
Ports--Collections of pins
Programming--Basic programming with the arduino

 
Remove these adsRemove these ads by Signing Up
 

Step 1What you need:

What you need:
Arduino (mine's a duemilanove, but other versions should work as well)
LEDs -- at least one
Resistors --as many as you have LEDs (use this calculator to calculate what you need.  Voltage = 5)
Breadboard (optional)
Wire (optional)
Cable to connect Arduino to Computer
Software (not all that hard to install, not going over it in this tutorial, see this for how to install and other arduino usages get it here)


« Previous StepDownload PDFView All StepsNext Step »
7 comments
May 20, 2011. 12:26 PMphevtron says:
so int ledPin = 13;
can be changed
for example become
int Col1 = 5
this tells the arduino that the pin 5 will be called from now on Col1 ?
thanks phevos
May 22, 2011. 9:58 AMphevtron says:
ok so to sum up
int col1=5 tells arduino that when i write col1 i mean 5 , and when i i type
digitalWrite(col1,HIGH) it will be like digitalWrite(5,HIGH) with 5 representing the pin but if the variable col1 is changed ...ahmmmm destruction?
May 22, 2011. 9:53 AMphevtron says:
hehe exactly, messing around with a home made 4x5 led matrix ;P
Dec 12, 2009. 5:57 AMletapjar says:

Nice instructable - one minor point:
In step 5 you have the following line:

The pins in the register are arranged from lower number = Least Significant Bit to Highest number - Most Significant Bit (so to get pins 0-3 to equal 0 and 4-7 to equal 1 it would be PORTX = B11110000)

The last part should say PORTD=B11110000 not PORTX


The code that follows is correct - but a newbie learning arduino from this example might be confused by that line.
 


Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
15
Followers
9
Author:killersquirel11