How does the arduino uno talk with i2c? i saw the circuit and it use analog input pins but as far as i know you cant use them as output. How does he send data over those pins?
1 Answer 1
Most pins on the Arduino are multi-function and can be switched into different modes. Analog is just one of those modes. I2C is one of the available modes for the pins that A4 and A5 are connected to.
answered Oct 23, 2015 at 16:06
-
But i cant change it using pinMode(Output), or can i?MyNick– MyNick2015年10月23日 16:42:33 +00:00Commented Oct 23, 2015 at 16:42
-
1pinMode(OUTPUT) will put the pin into digital IO mode and set it to output - just like every other pin.Majenko– Majenko2015年10月23日 16:43:11 +00:00Commented Oct 23, 2015 at 16:43
-
but i give it the index of the io pin (to the function), what values i give for the analog pins?MyNick– MyNick2015年10月23日 16:43:47 +00:00Commented Oct 23, 2015 at 16:43
-
Either the name (A3 for example) or 14 - 19 following on from the highest numbered digital pin D13.Majenko– Majenko2015年10月23日 16:44:34 +00:00Commented Oct 23, 2015 at 16:44
-
Wow didnt know that, thank you. And then its just a regular output io?MyNick– MyNick2015年10月23日 16:45:15 +00:00Commented Oct 23, 2015 at 16:45
lang-cpp