two anolog sensor inputs

I am working on a project where i have both an accelerometer and an LCD screen, and on all of the resources I have looked at they say to connect the sensors to the A4 and A5 analog in pins. How can I connect one of these sensors to two different analog in pins?

1 Like

For the accelerometer, can't you just connect to a different pin/pins, then also change the pin/pins in the code?

An LCD display is not a sensor. Why do you need an analog input pin for it?

Maybe you need to provide more information.
For an LCD, you can use whatever pins you want, as long as the code uses the corresponding pins.

There's more to writing programs than just copying and pasting other people's code.

Edit: Perhaps you should post your code, (within code tags), and also tell us exactly which LCD display and accelerometer you're using, along with which library resources you've been looking at. Links would help, too.

I think OP has I2C devices.
Many of those devices (128) can connect to the I2C pins of an Arduino (A4 and A5 for e.g. the Uno).
As long as every device has a different address.
Post links if you're not sure.

I think OP has I2C devices.

Duh. I'm a bit slow sometimes. (Of course, it wouldn't have hurt CharlieSullivan to mention it was an I2C LCD, for the benefit of not-too-bright readers like me. :smiley: )

And to answer Charlie's exact question, you can't use different pins. You must use either A4 and A5, or the dedicated I2C pins (R3), which are directly connected together. ie If you use the dedicated pins, (labelled SDA and SCL on the back of an UNO), you can't use A4/A5 for other purposes.

Hi there, I've a problem related to your answer here. I have a grove shield and the I2C breakouts are connected directly to the dedicated SDA and SCL uno pins - there is also a broken connector pad on each A4 and A5 pins on the shield (breaking) connection to the I2C breakouts from those pins.

On the Seeeduino there aren't dedicated SDA and SCL pins so you're supposed to solder the pads to connect A4 and A5 to the breakout connectors.

Question I have is will this be a problem once soldered and used again in an UNO at a later date? i.e. does directly connecting the dedicated SDA pin to the A4 pin and the SCL pin to the A5 pin on the UNO have any issues?

(I'm assuming not but that doesn't explain why Seeed would break connection from A4 and A5 in this way to the I2C breakout connectors)...

I hope that makes sense. Would be great to get anyone's thoughts on this.

It seems that there are multiple versions of the boards you have mentioned.
Post links to the right ones.

You can see the connections to A4 and A5 here.
This board has the I2C tracks to A4 and A5 on the back of the board.

thanks Wawa - though I'm not sure my question was clear.

This shield has P1 and P2 against pins A4 and A5 - see how they are broken.

In order to get the I2C grove connectors working when plugged into a Seeduino v3.0 you need to blob a solder oonto each one to reconnect the breakout connectors to A4 and A5.

This is because these breakout connectors are routed to the dedicated SDA and SCL pins on an UNO (see pins near to AREF) which the Seeeduino does not have.

So my questions are:

  1. would connecting A4 to dedicate SDA and A5 to dedicated SCL on the uno (e.g. if I solder these p1 and p2 so it works in my seeeduino but then use the grove shield in my uno again)?

and 2) if not, why would seeedstudio disconnect A4 and A5 from the I2C breakouts in the first place?


Yes. To get the Seeduino working, you need the solder bridges.

Seems you can just leave them on for an Uno_R3, because an Uno has the I2C lines connected to A4/A5 as well as the I2C pins near pin13.

I think the bridges are there to use that shield on a Mega.
A Mega has no I2C pins near pin13, and no I2C on A4/A5. They are on pin 20,21.

Thank you, great that's what I had assumed too. Though I hadn't thought about the mega! - I will watch out for that. I'll get my iron out then.

best regards,

How to connect the node mcu and water level sensor both in analogue A5 pin

How to connect the node mcu and water level sensor both in analogue A5 pin

Sorry, your question makes no sense whatsoever. :astonished:

Please post this as a new topic with a subject giving a proper short summary of your request, detailing exactly what parts you have to hand, what Arduino you are proposing to use if indeed, you are proposing to use an Arduino in addition to the NodeMCU, the Web site URL for the water sensor and any other parts, and a full description of the purpose of you project. :sunglasses: