Hi And Thanks For The Help Ahead Of Time.
Ive been tinkering with uno and mega for awhile now and i am not good at coding but pretty good at making different kinds of shields.
I have been messing around with home energy monitor and my latest build i used a uno card and 6 CT's / Clamp on Transformers with the resistors and capacitors and i use A0,A1,A2,A3,A4,A5 for My CT's I Also Use SCL and SDA for my date and times and pins 4 5 6 7 for 4 relays.
Now every thing seems to work good but the DATE and TIME on the data screen its crupt looking, if i swap uno card with mega card date time and every thing else is great.
so i thought the uno card was bad , so i got a new uno card and same problem, if i bend A4 and A5 Shield pins out of the way so they are not being used every thing is good exspet i lose 2 of my CT's cause they use A4 and A5.
Now sense this works with no problems on a mega card but not on a uno card is A4 and A5 doing something different between cards or do i need to code something different on uno , const int currentPin5 = 4;//A4 , const int currentPin6 = 5;//A5.
Hope this make some kinda sense.
A4 and A5 are the I2C pins. Don't try to use them for anything else when using I2C.
I2C is for LCD,s if im thinking right and im not using a LCD but nice to know, or am im wrong and I2C is something else? if so i shouldn't use it on my mega card also? all works good on mega but not uno.
The SDA/SCL pins are used for I2C, so your clock uses those pins. On the UNO, A4 is SDA and A5 is SCL, on the Mega the analog pins are separate from SDA/SCL, so there is no conflict.
If you want something smaller than a Mega, the Nano has eight analog inputs, A0 - A7, with A4 and A5 being used for I2C. A6 and A7 can only be used as analog inputs, while the others can be used for digital input/output.
AW Thank you very much now i understand and it all make sense to me now, brain fart lol