Pages: [1]   Go Down
Author Topic: Problems with analogWrite and RTC DS1307  (Read 272 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a code that uses a real time clock DS1307 and RGB LEDs. However, when I use the analogWrite function along with the rtc function such as:
DateTime now =;
for{byte x = 0; x < 254; x++){
  analogWrite(rgbPWMpin, x);
The LED starts to glow, but then the whole Aduino freezes after a random amount of time. Why does this happen and is there any way to fix this?

Note: I am using the library and instructions for the DS1307 from the ladyada website:

Seattle, WA USA
Online Online
Brattain Member
Karma: 614
Posts: 49386
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That code won't even compile. No setup(). No loop(). is down the internet a ways. Here, we get to see ALL the code.

Pages: [1]   Go Up
Jump to: