Arduino have the Wire Library that communicate with I2C.
This library allows you to communicate with I2C / TWI devices. On the Arduino boards with the R3 layout (1.0 pinout), the SDA (data line) and SCL (clock line) are on the pin headers close to the AREF pin. The Arduino Due has two I2C / TWI interfaces SDA1 and SCL1 are near to the AREF pin and the additional one is on pins 20 and 21. As a reference the table below shows where TWI pins are located on various Arduino boards.
Board I2C / TWI pins
- Uno, Ethernet A4 (SDA), A5 (SCL)
- Mega2560 20 (SDA), 21 (SCL)
- Leonardo 2 (SDA), 3 (SCL)
- Due 20 (SDA), 21 (SCL), SDA1, SCL1
You can take a look at , this examples.
Like @TheDoctor said:
The I2C data lines both need resistors to 3.3V. This keeps them from drifting if they are disabled. Andy resistor value should work, but it is recommended to use one between 10k ohm and 47k ohm.
- Can I get a summary of Homestuck
- Are all Nobel prize winner books sad
- Why is Andrew Yang polling at 3
- How do I catch a catfish
- Will print publications become extinct
- Who provides a digital signature
- What do you love about cosplaying
- Which are the principles of planning
- Why was India declared a secular country?no_redirect=1
- What are the slots under mailboxes for
- Who designed the Disney logo
- Is there a good tutorial about Qt
- What is get natural lighting in photography
- Is typhoon a Japanese word
- How many millenials cook at home
- How competitive is the Mensa IQ test
- Why do preconceived notions exist
- Why do people try to avoid responsibilities