Home > AVR, Creativity, Electronics, Other Peoples Posts, Tech > Arduino Oddity — Pulse Width Modulation (PWM) on Only Certain Ports

Arduino Oddity — Pulse Width Modulation (PWM) on Only Certain Ports

UPDATE II: Edited links to Makezine’s protoshield and TodBot’s candle light code.


UPDATE: I’m an idiot. Once I removed the protoshield, I saw that the board has clearly marked these pins as PWM! D’oh!  I guess I got too comfortable using the shield and never bothered to actually look at the Diecimila itself.


Hmmm… I was modifying Todbot’s candlelight effect code to use multiple LEDs, but it seems that only certain ports on the Arduino allow such (3, 5, 6, 9, 10, and 11); the others merely flash on/off. The whole point of the code is to illuminate the LED in varying brightness such that it looks like a flickering candle.

I’m using this particular prototyping shield (others can be found here, here, here, or here) and ran the tests again on the bare Arduino, but found nothing wrong with the shield. I need to research this to find out why. I’ll update this post when I discover the reason.

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: