I2C communication while reading analog data on the same analog pins?

I'm making a 6 probe resistance meter to track soil moisture for 6 plants (starting a water pump for each individual pot when necessary/soil is too dry).
I'm using a Arduino UNO (going to solder the IC to the pcb when i'm done setting it up).
Now, here is my problem. I'm using all 6 pins to keep track on 6 plants at once. However, I want to send data to a I2C LCD screen as well. Is there any way to use other pins with the Wire lib instead of A4 and A5?.
Right now absolutely all pins on my arduino uno is used but the rx and tx pins. Is it possible to communicate with these instead?

Thanks in advance! :wink:

Is there any way to use other pins with the Wire lib instead of A4 and A5?.

There exist soft I2C implementations that allow you to use all "normal" digital pins.

disclaimer - no experience.

Use a Pro Mini - two extra analog pins.

Paul__B:
Use a Pro Mini - two extra analog pins.

Thought about that, but not for this project. Got way too many 328 lying around. The Pro Mini is great though.
Btw: I buy my arduinos on eBay. I've seen lots of Pro Minis that states they got a 328 on board. That can't be right? The boards they give a picture of has the extra analog pins though.

robtillaart:

Is there any way to use other pins with the Wire lib instead of A4 and A5?.

There exist soft I2C implementations that allow you to use all "normal" digital pins.

disclaimer - no experience.

Sounds like a better choice! I'll look into it. Maybe I'll just connect two ICs toghether in serial as well. Got tons of 328's lying around. That would give me a total of 10 analog inputs if I use the standard I2C lib.

Or add an analog mux chip. Or a multichannel ADC chip.

thetoillmainn:
Btw: I buy my Arduinos on eBay. I've seen lots of Pro Minis that states they got a 328 on board. That can't be right? The boards they give a picture of has the extra analog pins though.

You appear to be rather confused here! Never mind.

Of course, the Pro Minis use the same chip - the ATmega328.

Mind you, while the same chip, it's not the same package, on the Pro Mini it is the TQFP - little square thing which has the extra pins, whilst what you have are presumably the DIL ones, which is why you are so happy to splash them around because they are dead easy to solder.

Well, do as you will. Pro Minis are less than $2.50 US on eBay so quite frankly, I think it is silly to build things using the DIL chips which generally cost more than that just for the chip itself. And would suit your project much better than using software I2C - not that that would be ineffective - or the complexity of using extra MCUs.

CrossRoads:
Or add an analog mux chip. Or a multichannel ADC chip.

I think the point is that he does not want to use other than what is already on hand, otherwise my suggestion of the Pro Minis would be the most straightforward.

Paul__B:

thetoillmainn:
Btw: I buy my Arduinos on eBay. I've seen lots of Pro Minis that states they got a 328 on board. That can't be right? The boards they give a picture of has the extra analog pins though.

You appear to be rather confused here! Never mind.

Of course, the Pro Minis use the same chip - the ATmega328.

Mind you, while the same chip, it's not the same package, on the Pro Mini it is the TQFP - little square thing which has the extra pins, whilst what you have are presumably the DIL ones, which is why you are so happy to splash them around because they are dead easy to solder.

Well, do as you will. Pro Minis are less than $2.50 US on eBay so quite frankly, I think it is silly to build things using the DIL chips which generally cost more than that just for the chip itself. And would suit your project much better than using software I2C - not that that would be ineffective - or the complexity of using extra MCUs.

CrossRoads:
Or add an analog mux chip. Or a multichannel ADC chip.

I think the point is that he does not want to use other than what is already on hand, otherwise my suggestion of the Pro Minis would be the most straightforward.

Ah, I haven't read much about the difference between the different versions of the 328 yet. My bad. Maybe I'll get a Pro Mini for the final design.
However, now I have a different problem. I'm trying to talk to my 16x2 I2C LCD with the LiquidCrystal_I2C.h library, and I get this error when uploading the code: "invalid conversion from int to t_backlighPol"
I tried google, but no helpful advice on how to fix it. I know this is a bit off-topic, but anyways..
Anyone have any idea?

Thanks for all the support so far though!

thetoillmainn:
However, now I have a different problem. I'm trying to talk to my 16x2 I2C LCD with the LiquidCrystal_I2C.h library, and I get this error when uploading the code: "invalid conversion from int to t_backlighPol"

Without seeing the full/actual error message it is a bit difficult to tell but
it probably means you are more than likely using an incorrect argument to a function/constructor.
You have passed in an argument that is an int type and the function/constructor wants a t_backlightPol type.
The t_backlightPol is an enum of POSITIVE and NEGATIVE.
So my guess is you have incorrectly defined the constructor.

If you posted the full error along with the line it indicates it will be much more obvious
what the issue is.

--- bill