Hi,
I'm using the 3.3V version of the Arduino Pro and a bunch of low-current-LEDs (they need about 2mA each). Since I need every port the Arduino offers, I've also connected LEDs to the Rx and Tx pins, which doesn't affect the upload of new sketches (they're just flickering simular to the orignal Rx/Tx LEDs on the Board).
(I don't know if this is important, but I connected the ground-pin of every LED to the Arduino, so setting the pin as HIGH the LED is off and setting it as LOW the LED is on.)
So here comes the Problem:
When the Arduino is running the sketch (which does not use any serial communication by the way) and turning the LEDs on, all the other LEDs are glowing about twice as bright
as the LEDs connected to pin 0 and 1.
Has anyone got an idea how this comes and what I can do about it?
The sketch is a little long to post it here (it's a binary clock), but here are the extracts, I'd consider as important:
void setup() {
pinMode(dcfpin, INPUT);
pinMode(buttonpin, INPUT);
for(int i=0; i<11; i++)
{ pinMode(i, OUTPUT); }
pinMode(dcfpowerpin, OUTPUT);
for(int i=14; i<20; i++)
{ pinMode(i, OUTPUT); }
//This is a function which simply sets all the output pins to HIGH
setall(false);
//This function encodes the DCF- signal
gettime();
//This function sets the status of the LEDs due to the current time
show();
}
void loop()
{
//sekunden, minuten, stunden and tag are the variables which hold the current time
sekunden++;
if(sekunden==60){minuten++; sekunden=0;}
if(minuten==60){stunden++; minuten=0; }
if(stunden==24){tag++; stunden=0;}
show();
if(digitalRead(buttonpin)==LOW){chkbuttoninput();}
delay(999);
delayMicroseconds(250);
}
I did't know they exist...thanks a lot.
According to the schematic the pins of the programming header aren't affected by the resistors, so I'll try to connect the LEDs to them.
Do you know a reason why these resistors are there?