I'm new in arduino world and i would start with domoting my home.
I need 3 arduino with each 10 digital input and 10 digital output, so i 'm oriented to Leonardo but i have two question:
1-Pin13 has the builtin led, so can i use it for my purpose or not?
2-For communication among the 3 arduino i need the twi that use 2 pin: so i should need 22 pin (if so Leonardo is not capable), or maybe the twi pins are apart from the 20 digital pin? Looking at figure of Leonardo i can see sda/scl pin aside.
The LED on pin 13 is no problem. You can use it.
If you are running out of pins you can use shift registers. They are a cheap way to expand the number of digital outputs. They require only 3 pins, but you can chain many of them one after another. That means you can easily get 20 outputs using only three pins on the Arduino.
Robin2:
As far as I can see the two extra pins marked SCL and SDA are directly connected to pins D2 and D3.
Yes. The SCL/SDA pins are meant to be a common place to put the i2c pins. On the Uno, the i2c pins are on A4/A5, on the Leonardo, the i2c pins are 2/3, on the Mega the i2c pins are 20/21.
In terms of the led pin (pin 13 in the case of the Leonardo), you can use it for an output pin (the builtin led will also flash at the same time), but if you use it for input, you have to compensate for the resistor that is part of the led circuitry. Pin 13 on the Leonardo is capable of doing PWM.