2

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?

asked Oct 23, 2015 at 16:05

1 Answer 1

2

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
7
  • But i cant change it using pinMode(Output), or can i? Commented Oct 23, 2015 at 16:42
  • 1
    pinMode(OUTPUT) will put the pin into digital IO mode and set it to output - just like every other pin. Commented 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? Commented Oct 23, 2015 at 16:43
  • Either the name (A3 for example) or 14 - 19 following on from the highest numbered digital pin D13. Commented Oct 23, 2015 at 16:44
  • Wow didnt know that, thank you. And then its just a regular output io? Commented Oct 23, 2015 at 16:45

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.