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?

askedOct 23, 2015 at 16:05
MyNick's user avatar

1 Answer1

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.

answeredOct 23, 2015 at 16:06
Majenko's user avatar
7
  • But i cant change it using pinMode(Output), or can i?CommentedOct 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.CommentedOct 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?CommentedOct 23, 2015 at 16:43
  • Either the name (A3 for example) or 14 - 19 following on from the highest numbered digital pin D13.CommentedOct 23, 2015 at 16:44
  • Wow didnt know that, thank you. And then its just a regular output io?CommentedOct 23, 2015 at 16:45

Your Answer

Sign up orlog in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

By clicking “Post Your Answer”, you agree to ourterms of service and acknowledge you have read ourprivacy 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.