Adafruit Datalogging Shield and analog input

Hi!
I have an Arduino UNO SMD and an Adafruit Datalogging Shield revB.
I see that analog input 4 and 5 are wired to the SDA and SCL for RTC i2c communication.
Can I use anly 4 analog pins (0,1,2,3)?

Thanks

If your sketch uses the I2C interface then you cannot use A4 and A5 for analogue input

Thank you! And what happens if I use 2 sketches, the first to set the time and the second to use the analogue input? Can it work?

Do you want to use the time in the second sketch ?

If so, can you get it without using I2C ?

just to be sure..Pins A4 and A5 are also connected to the SDA and SCL pins.... I can't use them anyway, right?

Yes, I need time also in the second sketch from my RTC :frowning:

Thank you for your help

You can use them as normal analogue pins if the sketch does not use the I2C interface but you cannot use I2C and A4 and A5 as analogue pins in the same sketch

I note that the logger shield appears to have solder bridges connecting its SDA and SCL pins to A4 and A5
image
but breaking these linkages will not make the pins available to be used for 2 purposes in the same sketch

Ok! Not the best news but thank you for your explanation and help :slight_smile:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.