LED behaves differently with Nano vs Uno


i wasn't sure put this: please let me know if belongs in other area.

i developed simple flickering candle led application using uno , purchased nano final product, because nano smaller.  using a11 on uno, switched a5 nano.  problem analogwrite() seems able display variety of light levels on uno, nano, led either on or off.  code below.  inserted "for" loop diagnostic see led go dim bright, flashing (on or off) on nano.  led same on both uno , nano.

any thoughts?



int led = a5;

void setup() {
  pinmode(led, output);
  }

void loop() {
  // added diagnosis
  (int = 0; <= 255; = + 10) {
    analogwrite(led, i);
    delay(100);
    }
   
  analogwrite(led, 125 + random(125));
  delay(random(80));
  }

never mind.  found reference compared pins between uno , nano.  needed use digital 5 rather analog 5.  confused because analog 11 works on uno.


Arduino Forum > Using Arduino > LEDs and Multiplexing > LED behaves differently with Nano vs Uno


arduino

Comments

Popular posts from this blog

Error compiling for board Arduino/Genuino Uno.

Installation database is corrupt

esp8266 (nodemcu 0.9) client.write très lent ???