[solved] arduino uno broken

my arduino uno lights an led when i type LOW and turns it off when i type HIGH. what do i do?

the same happens for inputs - it detects as LOW when HIGH

i am an absolute newb - started 2 days ago so not too technical please

Post your code and schematic.
There’s nothing unusual about a LED lighting up when writing a LOW, it just depends on how you’ve wired it, and whether or not you’ve made sure that your pin is an output.

whats code and schematic? do you mean code and wiring for that project?

int brightness = 0;
int brightness1 = 255;
int fadeAmount = 5;
int i = 0;

void setup()
{
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(8, OUTPUT);
}
void loop()
{
digitalWrite(8, HIGH);
while (i < 1)
{
analogWrite(9, brightness);
analogWrite(10, brightness1);

brightness = brightness + fadeAmount;
brightness1 = brightness1 - fadeAmount;

if (brightness == 0 || brightness == 255)
{
fadeAmount = -fadeAmount ;
i ++;
}
delay(10);
}
analogWrite(9, brightness);
analogWrite(10, brightness1);

brightness = brightness + fadeAmount;
brightness1 = brightness1 - fadeAmount;

if (brightness == 0 || brightness == 255)
{
fadeAmount = -fadeAmount ;
}
digitalWrite(8, LOW);
delay(50);
analogWrite(9, brightness);
analogWrite(10, brightness1);

brightness = brightness + fadeAmount;
brightness1 = brightness1 - fadeAmount;

if (brightness == 0 || brightness == 255)
{
fadeAmount = -fadeAmount ;
}
digitalWrite(8, HIGH);
delay(10);
i = 0;
}

i dont have a schematic because it is my own design butif i can put on a photo i can show you

the code works on mine because i reversed the output things

how do i do a photo?

led led led | | | 5v pin 5v pin 5v pin and and and pin 10 pin 8 pin 9

a bit like this

Any resistors on the LEDs? I hope so!

Turn the LED around and see if that makes a difference...

now nothing happens because theyre diodes

when i run this the two side leds fade in and out and the middle one flashes every time one of them is off

But you do have resistors, don't you?

(Please use code tags when posting code)

no resistors because i dont know which ones to use

Ah, So the thread title may well be true.

that bad?

Yes, though you may have got lucky.

What made you think you could get away without resistors?

i didnt know they were needed - i am a newb

how can i tell?

How can you tell what? What size resistor to use? Subtract the forward voltage of the LED from the supply voltage and divide the result by the forward current, and add a few ohms for safety. Start with something in the range 220 to 330R is my starting point.

how can i tell if its broken? how do i find out the forward voltage and current?