Go Down

Topic: Imcompatible LiquidCrystal.h & DS1307 librarys (Read 607 times) previous topic - next topic

Baltasar

Nov 19, 2009, 05:53 pm Last Edit: Nov 19, 2009, 08:01 pm by baltasar Reason: 1
Hi, just one problem I'm facing with.

My sketch starts like this:

.........................................
#include <WProgram.h>
#include <Wire.h>
#include <DS1307.h> // OPTION 1
#include <LiquidCrystal.h> // OPTION 2

LiquidCrystal lcd(8, 9, 4, 5, 6, 7); // OPTION 2
.........................................

My problem is stopping having PWM on pin 3, only works if I either comment option 1 or both 2.

Can anyone confirm that problem? Is there a workaround?

I'm using Arduino Duemilanove + Sparkfun RTC + LCD Keypad Shield from DFROBOT.

Thanks.
Check all my projects based on Atmel/Arduino -> www.aqualed-light.com

Baltasar

Solution for now is using only Wire.h library and not the RTC DS1307.h one and talk to RTC manually like this for example:

 Wire.begin();
 Wire.beginTransmission(DS1307_I2C_ADDRESS);
 Wire.send(0);
 Wire.send(0x00);
 ..................................

But I hope soon anyone can find out a solution for using back the DS1307.h lib as is much easier with the commands.

If anyone wants to see the error/bug I'm talking about, just need to load the FADE example from Arduino IDE, change the led pin var to D3 (pin3) and even not having an LCD shield or RTC load this as I mention on previous post:

#include <WProgram.h>
#include <Wire.h>
#include <DS1307.h>
#include <LiquidCrystal.h>

LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

You going to realize that the led doesn't do nothing, or my Arduino is totally crazy and is the only one with this behavior...


:o
Check all my projects based on Atmel/Arduino -> www.aqualed-light.com

Go Up