Martouffff / lolshield

Automatically exported from code.google.com/p/lolshield
0 stars 0 forks source link

LoLShield Charlieplex library conflict with DS3231 (Chronodot) #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

When I load Charlieplexing.h and Wire.h, and then call the req'd 
"LedSign::Init()" in the void.setup(), it seems the sketch crashes.

In the code example below, when the LedSign::Init is commented out, The Serial 
Monitor shows:

init           (command before the fouling Init)
made it        (command following the fouling - but commented out- Init)
get time       (the proper operations in the loop())
...
...  and works properly (it won;t show every second, as there are a number of 
debugging delay() statements)

When LedSign::Init() is active,  all I get in the serial monitor is:

init                        command before the fouling Init
                              ...
                              (chirping crickets)
                              ...

1. any arduino I have (Mega, Duemillablahblahblah, and ProMini5/16
2. Macetech Chronodot
3. charlieplex network w/ 72 LEDS

What is the expected output? What do you see instead?
i am expecting to see lights.  the sketch seems to freeze once either: 
Charliplexing or Wire gets init'ed/started.
see below..

What version of the product are you using? On what operating system?
Win7
arduino IDE 1.0 & 1.01

Please provide any additional information below.
Snippet of code:

/*
DS3231_test.pde
Eric Ayars
4/11

Test/demo of read routines for a DS3231 RTC.

Turn on the serial monitor after loading this to check if things are
working as they should.

*/

#include <DS3231.h>
#include <Wire.h>
#include <Charliplexing.h>

DS3231 Clock;
bool Century=false;
bool h12;
bool PM;
byte ADay, AHour, AMinute, ASecond, ABits;
bool ADy, A12h, Apm;

byte year, month, date, DoW, hour, minute, second;

void setup() {

    // Start the serial interface
    Serial.begin(9600);

delay(1000);

    Serial.println(" init ");            //  <-- This prints, ++
delay(1000);

 //  LedSign::Init();                   //  <-- when this is enabled

delay(1000);
    Serial.println("made it");      //  <-- this doesn't print ++
delay(1000);                             //  <-- Nothing after the LedSign 
command executes

// Start the I2C interface
    Wire.begin();

}

void loop() {
    // send what's going on to the serial monitor.
    // Start with the year

    Serial.print("get time"); delay(1000);
    Serial.print('\n');
    delay(1000);

    // Display the time once more as a test of the getTime() function
    Clock.getTime(year, month, date, DoW, hour, minute, second);
    Serial.print(year, DEC);
    Serial.print(month, DEC);
    Serial.print(date, DEC);
    Serial.print(DoW, DEC);
    Serial.print(hour, DEC);
    Serial.print(minute, DEC);
    Serial.println(second, DEC);
}

please help!

Original issue reported on code.google.com by GoolG...@gmail.com on 1 Jul 2012 at 5:06

GoogleCodeExporter commented 9 years ago
still no takers?  
I read somewhere that lolshield is incompatible with arduino1.01

Original comment by GoolG...@gmail.com on 22 Oct 2012 at 9:57

GoogleCodeExporter commented 9 years ago
hey, I have the same issue. I've sent an e-mail, did you solve it?:)

Original comment by robmarc2...@gmail.com on 7 May 2013 at 5:14

GoogleCodeExporter commented 9 years ago
in the Charliplexing.cpp (sic) is a bug. during Init the function SetBrightness 
is called which contains Serial.end(); delete it - it is not needed! actually 
it doesnt make a bit of sense.
see: Issue 31

in general the library at its current state is a complete mess. i'm sorry, but 
it's so hard to read, unfinished and incompatible with the Mega and Leonardo at 
least

Original comment by mrvis...@googlemail.com on 1 Jul 2013 at 3:13

GoogleCodeExporter commented 9 years ago
I removed the Serial.end() in revision 28.  I don't have a Chronodot to test 
with, though.

Also, re mrvisual, I added Mega support in revision 30.

Original comment by r...@ihack.net on 20 Aug 2013 at 6:32

GoogleCodeExporter commented 9 years ago

Original comment by r...@ihack.net on 29 Aug 2013 at 2:42