ah I guessed that but I thought it wouldn't be that simple lol. Hi I'm unsure of what wattage resistor i need. The datasheet says that R3 controls the amount of current produced. So 12V at 288ma produces 1.2watts of power. Does that mean I need a resistor thats 40ohms and can withstand 1.2watts of power? Correct me if am wrong must are only 0.5 watt.
Resistors come in all sorts of values and wattage ratings. Start by clicking on "Passive components" on the left of http://www.mouser.com then go to metal film resistors
The "rule of thumb" is to double your calculated power dissipation; so 1.2W x 2 = 2.4W. That's not a standard power rating. They generally jump from 2W to 3W. However, if you can find a 2.5W in 40 Ohms, go for it.
40 Ohms isn't a standard E24 value of resistance, either. However, you could likely get away with using two 20 Ohm 1W resistors in series.
Make sure air can circulate around them; don't mount them down tightly on the board.
Let's review the formula.
Io=(V(pin 2) - V(pin 5)) / R. R is the resistor that goes between pins 2 and 5.
Looking at the datasheet tables, I see Vsc under the heading "Current Regulation Loop", which is the voltage difference between pins 2 and 5, using pin 5 as the reference. Nominally, it's 0.45v, with a range of 0.38 to 0.52v.
Juggling around the formula, you can re-state it as:
Io=Vsc/R
and:
R=Vsc/Io
So, for starters, you can plug in 0.45v for Vsc:
R=0.45/Io
Then plug in your desired output current limit for Io, and calculate R.
Keep in mind that the regulator won't put out more current than you've limited it to. The lower the value of R, the greater the current - up to a point. You don't want to exceed the current or power limits of the regulator.