Arduino Uno i need more pins!

Hello guys..I am making a smart home for my graduation project using Arduino Uno and Ethernet Shield...The problem is that Pin 0 and pin 1 is used for Serial communication as i read...Pin 4 is used for SD.begin and pins 10,11,12,13 for the Ethernet shield...So i have pins 2,3,5,6,7,8,9 to use...
The problem is that i want to control 9 things (8 leds and 1 motor) so i need 2 more pins...
The 8 leds must be controlled differently so i think an array will not help...
If there is no solution i guess i must upgrade to arduino mega but i cant afford it right now :confused:
Is there any way i can use pins 0 and 1 or even 10-13 for leds without have any problem with ethernet shield etc? Any idea that will help?

You can use the analog pins as digital pins.

Whandall:
You can use the analog pins as digital pins.

You mean i can use the A0 - A5 Analog Input pins as Digital OutPut?

pinMode(A0, OUTPUT);
digitalWrite(A0, HIGHT);

Just like that? :slight_smile:

digitalWrite(A0, HIGHT);

No, not at all like that. :wink:

If you drop the 'T' from the 'HIGHT', yes.

Hahahaha i know guys....I tried to Edit but i need 5 min after post.....Hehehehe thanks guys :slight_smile:

12 LEDs can be controlled with 4 pins if Charlieplexed. Or you can use a shift register to drive 8.

You might be able to use the SPI bus to talk to the shift register and the Ethernet shield with a
bit of care - the latch input to a 74HC595 can be treated like an SPI chip-select signal for the register.

Thanagor:
The 8 leds must be controlled differently so i think an array will not help...

When using WS2812 RGB LEDs, you can control up to 1000 LEDs with just a single output pin.

You mean i can use the A0 - A5 Analog Input pins as Digital OutPut?

This is a graduation project and you didn't know that ? - Failed

You embarked on the project using a Uno but did not check the number of pins available ? - Failed