I2C Trouble


i using arduino mega 2560 board have lcd , real time clock on i2c. @ 1 time working. rtc not initialize lcd works fine. if unplug lcd rtc works? got idea doing wrong. here of code using:

#include <wire.h>          // required rtclib.h
#include <onewire.h>
#include "rtclib.h"
#include <liquidcrystal_i2c.h>

//                    addr, en,rw,rs,d4,d5,d6,d7,bl,blpol
liquidcrystal_i2c lcd(0x3f, 2, 1, 0, 4, 5, 6, 7, 3, positive);  // set lcd i2c address

rtc_ds1307 rtc;
char lcdstring[50];
string dstring;

thanks,
bill

what address of rtc?

did try i2cscanner?


Arduino Forum > Using Arduino > Networking, Protocols, and Devices (Moderator: fabioc84) > I2C Trouble


arduino

Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code