user32825: I would like to do,
analogWrite(100,3);
 analogWrite(200,6);
at the same time. But the problem is that only the led on pin 3 lights up. I want both to light up at the same time. I've heard about direct port manipulation, but I can only find an alternate for digitalWrite() but I couldn't find one for analogWrite(). Can someone please help me with just a simple example on just how to do the above operation? 
I'm using arduino uno.

user4143: You have your parameters the wrong way round:
analogWrite(2, 100);
analogWrite(6, 200);

However: pin 2 on the Uno cannot do PWM, so you will have to pick a different pin. Look for the pins marked with ~ - they are the PWM pins. On the Uno that is pins 3, 5, 6, 9, 10 and 11.

32825: <p>I would like to do,</p>

<p><code>analogWrite(100,3);
 analogWrite(200,6);</code></p>

<p>at the same time. But the problem is that only the led on pin 3 lights up. I want both to light up at the same time. I've heard about direct port manipulation, but I can only find an alternate for <code>digitalWrite()</code> but I couldn't find one for <code>analogWrite()</code>. Can someone please help me with just a simple example on just how to do the above operation? </p>

<p>I'm using arduino uno.</p>
 4143: <p>You have your parameters the wrong way round:</p>

<pre><code>analogWrite(2, 100);
analogWrite(6, 200);
</code></pre>

<p><strong>However</strong>: pin 2 on the Uno cannot do PWM, so you will have to pick a different pin. Look for the pins marked with <code>~</code> - they are the PWM pins. On the Uno that is pins 3, 5, 6, 9, 10 and 11.</p>
