Pages: [1]   Go Down
Author Topic: Imcompatible LiquidCrystal.h & DS1307 librarys  (Read 590 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 41
Arduino DUE rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: November 19, 2009, 02:01:29 pm by baltasar » Logged

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 41
Arduino DUE rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

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

Pages: [1]   Go Up
Jump to: