Question: I've got a silly situation. I have an Arduino board (2009). There's just one inbuilt LED but can't do much with it beyond blinking. I have five LEDs (3 yellow, 2 green), breadboards, jumper wires but not resistors. (And there is a total lockdown here) I wish to play with these LEDs but can't risk it putting it directly. I tried using them in series but that did not light them up.
I know each LED needs a 330ohm resistor but that I don't have. I even have a 2x 7 segment display too but the same problem.

Any way to use them?
Thanks.

Update:

On suggestions, we have got two resistors from a faulty solder gun (blue-grey-orange-gold = 68k) and a (brown-black-brown-gold = 100) and 1 IN4000 diode.

Answer: 
Try this as the loop function of your Arduino sketch:

```
void loop() {
pinMode(2, INPUT_PULLUP); //Pull up is built in to the Atmega chip. 
//It will be at least 20k - very little current will flow through the LED.
// LED should light dimly.
//May need to turn off room lights or cover with hands to see.

delay(1000);  // Wait one second.
pinMode(2, INPUT); //Input mode turns off the pull up.  No current to LED.

delay(1000);  
}

```

Connect an LED to GPIO 2 (or use another pin and change the code to match) with the LED cathode connected to the Arduino ground.

It may be **very** dim. The built in pull up will be at least 20k, and may be as high as 200k depending on which processor is built in to your Arduino.

[Information on "pinMode".](https://www.arduino.cc/reference/en/language/functions/digital-io/pinmode/)

[Information on Arduino pull ups.](https://www.arduino.cc/en/Tutorial/DigitalPins)

---

The above is a trick, and may not work. I haven't tried it out.

Whether it works or not will depend on how efficient your LEDs are and which processor you use.

Try it out. It **cannot** hurt your processor or your LED.

Do **not** change the pin mode to output. That may damage your processor (though probably not.)

---

This is the [same idea that Sadat Rafi had](https://electronics.stackexchange.com/a/511945/47070) except using the Arduino library functions rather than generic Atmega code.

The same cautions about LED efficiency that I've given here apply to that answer as well.

---

Pin 13 was a poor choice on my part. It is used for other things on the Arduino.

I've changed the code to use GPIO 2, which shouldn't have any conflict.

Do **NOT** use GPIO 0, 1, or 13 with this trick.

Those pins are connected to other things on the Arduino board. Those other things could cause damage to the Arduino if there are LEDs attached, and will almost certainly interfere with normal operation of the Arduino.
Anything between about 250 ohms and 10K will work fine. Surely you can sacrifice something and pull resistors out of it and maybe extend the leads a bit.