Hitchhikers Guide to i2c
- What is i2c
Basic: i2c means Inter-Integrated Circuit and it´s a bus-system for attaching low-speed peripherals. According to Wikipedia.
- Pin Map of the Core
D0 = SDA; D1=SCl -> here is the mapping of the complete core pins
- Do I have to use pullup-resistors
Mhm, not exactly sure, but let me say I have to. I have a 16x2 LiquidCrystal Display with an i2c backpack from sainsmart (2004) - when I try to find the correct i2c adress without 4,7K Ω resistors the scanner did not find any adress.
- What, you say scanner?
Yes, the i2c adress can be from 0x01 to 0x7E and higher. Sometimes when you buy a i2c device the reseller gives you the information that the adress is 0x… and you try it and the device did not do anything. So chances are high that you send your commands to the wrong adress. Therefore is better to quick fire up a scanner and off you go!
I used the scanner from Arduino Playground. Just copy the raw content to Cloud IDE and change the line:
We are finally there - now open up the serial monitor of your choice and connect to the core. You should no find a line like this:
I2C device found at address 0x3F !
you´ve received a free towel and can fetch it every time you want on Alpha Centauri
Read the Docs. On Mac there is CoolTerm, but site from the-meiers is currently down (4days or more by now). I use SerialTools on Mac instead. It´s completely up to you which one you choose.
So hopefully I did all things right, next up bring the 1602lcd i2c lib to life!