LiquidCrystal_I2C lcd1(0x20,16,2) // set the LCD address of the first lcd to 0x20 It can be used with the same functions as in “LiquidCrystal”, only initialisation of the LCD-object is different. LiquidCrystal_I2C lcd(0x20,16,4) // set the LCD address of the first lcd to 0x20Ĭonnecting your I2C-module to an Arduino via SDA and SCLīoth modules use the I2C bus, which makes connection very easy. If you’re using an Pro Mini-compatible the pins are A4 and A5 for data and clock, which are parallel to the main pins, as shown below: If you’re using an Arduino Mega the pins are D20 and D21 for data and clock: On Arduino Uno or compatible boards, these pins are A4 and A5 for data and clock: Moving on – first you will need to identify which pins on your Arduino or compatible boards are used for the I2C bus – these will be knows as SDA (or data) and SCL (or clock). The library to use for this ‘mjkdz’-module is “ LiquidCrystal_I2C.h” and can be found here: Other I2C-modules are available, like the ‘mjkds’-module: #WIRE H LIBRARY ARDUINO DOWNLOAD PRO# Mark the same name for the library, but initialisation is a bit different.And, would you mind taking a look at my code? I have the rc-car example code working well with my spark and motor shield. I have installed a robot arm and hand to my car, but haven’t quite gotten any servos to work.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |