How can I connect Arduino to another Arduino ?

I have 2 Arduino Uno and I want to connect many sensors to the Arduino so I need to connect the 2 Arduino's to each other to have more bins instead of buying a new mega Arduino.

I have used this tutorial

but I don't know if I can connect sensors to both of them(master and slave)?

Two Arduino Unos are cheaper than one Mega ?

Have you priced it out on eBay?

I don't think that they are cheaper, I had one and I got another one from my friend who is working with me on the same project

What type(s) of sensors?

sterretje:
What type(s) of sensors?

LDR
a temperature sensor
a humidity sensor
PIR sensor
relays
a small motor
a small lamp
rain sensor
wind sensor
I'm making a smart greenhouse By the way.

Thanks for that. I count 5 wires for the sensors (and in case some need two wires, make that 10); that leave you 10 pins for outputs (8 if you want to keep the serial port free). Not enough? You can consider port expanders to drive e.g. a relay board.

And to answer the original question, yes, you can still use the Arduinos to do other things. Just try to organise it in a clever way to make life easy; all inputs on one Arduino, all outputs on the other.

sterretje:
Thanks for that. I count 5 wires for the sensors (and in case some need two wires, make that 10); that leave you 10 pins for outputs (8 if you want to keep the serial port free). Not enough? You can consider port expanders to drive e.g. a relay board.

And to answer the original question, yes, you can still use the Arduinos to do other things. Just try to organise it in a clever way to make life easy; all inputs on one Arduino, all outputs on the other.

okay, thank you so much

haskor:
I don't think that they are cheaper, I had one and I got another one from my friend who is working with me on the same project

I still think you should reconsider this approach.
It is unwieldy and not good for future projects.
It is better to start out with a good architecture which is a Mega if you are going to have more sensors than available to use with Uno.

My 2 cents.

ieee488:
I still think you should reconsider this approach.
It is unwieldy and not good for future projects.
It is better to start out with a good architecture which is a Mega if you are going to have more sensors than available to use with Uno.

My 2 cents.

okay, I will consider it, thanks.