Troubleshooting for a Wordclock

Hello all,

I'm posting this as quite a novice when it comes to electronics. I was hopeful that I could get an Arduino Wordclock to function using this instructable. Modifications included adapting the language and using a DS3231 RTC instead of a 1307. I first put everything together in December 2016 and it worked fine on the breadboard until I cannibalised it to solder everything onto a PCB. It is then that things started going awry, so that I spent the last year troubleshooting.

To cut a long story short: I rebooted the project a month ago on a breadboard in order to start from scratch. I used this circuit diagramme as a basis, omitting the BY133 diodes and 4 minute-indicating LEDs, and using a step down converter instead of the 7805. Also, the LDR is not yet being used but will be in the final setup.

Using my Arduino Nano with the sketch I used last year creates erratic behaviour of the lights (could this be the ULN2803G? I will post a video ASAP). Also, for some reason I have -12V on the lead between the ULN2803 and the source.

Trying to upload the sketch again yields the error message in the next post in the Arduino IDE.

As said, I am quite a novice in the field and have to confess that this project is a lot more complicated than it seemed at first :slight_smile:

Greetings,

Sven

WORDCLOCKLX.ino (10.3 KB)

Arduino: 1.6.9 (Windows 10), TD: 1.31, Board: "Arduino Nano, ATmega328P"

WORDCLOCKLX:56: error: 'tmElements_t' does not name a type

 tmElements_t tm;

 ^

C:\Users\chief\Documents\Arduino\Projects\WORDCLOCKLX\WORDCLOCKLX.ino: In function 'void loop()':

WORDCLOCKLX:101: error: 'RTC' was not declared in this scope

       RTC.read(tm) ;  //new

       ^

WORDCLOCKLX:101: error: expected primary-expression before ')' token

       RTC.read(tm) ;  //new

                  ^

WORDCLOCKLX:103: error: expected primary-expression before ')' token

       RTC.write(tm); //new

                   ^

WORDCLOCKLX:110: error: 'RTC' was not declared in this scope

       RTC.read(tm) ;  //new

       ^

WORDCLOCKLX:110: error: expected primary-expression before ')' token

       RTC.read(tm) ;  //new

                  ^

WORDCLOCKLX:112: error: expected primary-expression before ')' token

       RTC.write(tm); //new

                   ^

C:\Users\chief\Documents\Arduino\Projects\WORDCLOCKLX\WORDCLOCKLX.ino: In function 'void timeToBytes()':

WORDCLOCKLX:126: error: 'RTC' was not declared in this scope

   if (RTC.read(tm)) {

       ^

WORDCLOCKLX:126: error: expected primary-expression before ')' token

   if (RTC.read(tm)) {

                  ^

WORDCLOCKLX:128: error: expected primary-expression before '.' token

     int deutschHour = shortHour(tm.Hour);

                                   ^

WORDCLOCKLX:141: error: expected primary-expression before '.' token

       if (tm.Minute >= 5 && tm.Minute <= 9){

             ^

WORDCLOCKLX:141: error: expected primary-expression before '.' token

       if (tm.Minute >= 5 && tm.Minute <= 9){

                               ^

WORDCLOCKLX:145: error: expected primary-expression before '.' token

       else if (tm.Minute >= 10 && tm.Minute <= 14){

                  ^

WORDCLOCKLX:145: error: expected primary-expression before '.' token

       else if (tm.Minute >= 10 && tm.Minute <= 14){

                                     ^

WORDCLOCKLX:149: error: expected primary-expression before '.' token

       else if (tm.Minute >= 15 && tm.Minute <= 19){

                  ^

WORDCLOCKLX:149: error: expected primary-expression before '.' token

       else if (tm.Minute >= 15 && tm.Minute <= 19){

                                     ^

WORDCLOCKLX:153: error: expected primary-expression before '.' token

       else if (tm.Minute >= 20 && tm.Minute <= 24){

                  ^

WORDCLOCKLX:153: error: expected primary-expression before '.' token

       else if (tm.Minute >= 20 && tm.Minute <= 24){

                                     ^

WORDCLOCKLX:157: error: expected primary-expression before '.' token

       else if (tm.Minute >= 25 && tm.Minute <= 29){

                  ^

WORDCLOCKLX:157: error: expected primary-expression before '.' token

       else if (tm.Minute >= 25 && tm.Minute <= 29){

                                     ^

WORDCLOCKLX:163: error: expected primary-expression before '.' token

       else if (tm.Minute >= 30 && tm.Minute <= 34){

                  ^

WORDCLOCKLX:163: error: expected primary-expression before '.' token

       else if (tm.Minute >= 30 && tm.Minute <= 34){

                                     ^

WORDCLOCKLX:167: error: expected primary-expression before '.' token

       else if (tm.Minute >= 35 && tm.Minute <= 39){

                  ^

WORDCLOCKLX:167: error: expected primary-expression before '.' token

       else if (tm.Minute >= 35 && tm.Minute <= 39){

                                     ^

WORDCLOCKLX:173: error: expected primary-expression before '.' token

       else if (tm.Minute >= 40 && tm.Minute <= 44){

                  ^

WORDCLOCKLX:173: error: expected primary-expression before '.' token

       else if (tm.Minute >= 40 && tm.Minute <= 44){

                                     ^

WORDCLOCKLX:178: error: expected primary-expression before '.' token

       else if (tm.Minute >= 45 && tm.Minute <= 49){

                  ^

WORDCLOCKLX:178: error: expected primary-expression before '.' token

       else if (tm.Minute >= 45 && tm.Minute <= 49){

                                     ^

WORDCLOCKLX:183: error: expected primary-expression before '.' token

       else if (tm.Minute >= 50 && tm.Minute <= 54){

                  ^

WORDCLOCKLX:183: error: expected primary-expression before '.' token

       else if (tm.Minute >= 50 && tm.Minute <= 54){

                                     ^

WORDCLOCKLX:188: error: expected primary-expression before '.' token

       else if (tm.Minute >= 55 && tm.Minute <= 59){

                  ^

WORDCLOCKLX:188: error: expected primary-expression before '.' token

       else if (tm.Minute >= 55 && tm.Minute <= 59){

                                     ^

WORDCLOCKLX:235: error: expected primary-expression before '.' token

     if (tm.Minute <= 4){

           ^

C:\Users\chief\Documents\Arduino\Projects\WORDCLOCKLX\WORDCLOCKLX.ino: In function 'void addTime(int, int)':

WORDCLOCKLX:256: error: expected unqualified-id before '.' token

       tm.Hour = tm.Hour + addHour;

         ^

WORDCLOCKLX:257: error: expected primary-expression before '.' token

       if (tm.Hour > 12) {

             ^

WORDCLOCKLX:258: error: expected unqualified-id before '.' token

         tm.Hour = tm.Hour - 12;

           ^

WORDCLOCKLX:263: error: expected unqualified-id before '.' token

       tm.Minute = tm.Minute + addMinute;

         ^

WORDCLOCKLX:264: error: expected primary-expression before '.' token

       if (tm.Minute > 59) {

             ^

WORDCLOCKLX:265: error: expected unqualified-id before '.' token

         tm.Minute = tm.Minute - 60;

           ^

WORDCLOCKLX:270: error: expected unqualified-id before '.' token

     tm.Second = 0;

       ^

C:\Users\chief\Documents\Arduino\Projects\WORDCLOCKLX\WORDCLOCKLX.ino: In function 'void printTime()':

WORDCLOCKLX:284: error: 'RTC' was not declared in this scope

   if (RTC.read(tm)) {

       ^

WORDCLOCKLX:284: error: expected primary-expression before ')' token

   if (RTC.read(tm)) {

                  ^

WORDCLOCKLX:285: error: expected primary-expression before '.' token

     print2digits(tm.Hour);

                    ^

WORDCLOCKLX:287: error: expected primary-expression before '.' token

     print2digits(tm.Minute);

                    ^

WORDCLOCKLX:289: error: expected primary-expression before '.' token

     print2digits(tm.Second);

                    ^

WORDCLOCKLX:291: error: expected primary-expression before '.' token

     Serial.print(tm.Day);

                    ^

WORDCLOCKLX:293: error: expected primary-expression before '.' token

     Serial.print(tm.Month);

                    ^

WORDCLOCKLX:295: error: expected primary-expression before '.' token

     Serial.print(tmYearToCalendar(tm.Year));

                                     ^

WORDCLOCKLX:295: error: 'tmYearToCalendar' was not declared in this scope

     Serial.print(tmYearToCalendar(tm.Year));

                                          ^

exit status 1
'tmElements_t' does not name a type

Dieser Bericht wäre detaillierter, wenn die Option
"Ausführliche Ausgabe während der Kompilierung"
in Datei -> Voreinstellungen aktiviert wäre.

You may now have to add this include statement in your code:

#include <TimeLib.h>

The link you provided to your schematic cannot be opened. The server responds with:

Forbidden
You don't have permission to access /wordclock/wordclock_german_modified.gif on this server.
Apache Server at arduino.joergeli.de Port 80

As said, I am quite a novice in the field and have to confess that this project is a lot more complicated than it seemed at first :slight_smile:

Unfortunately, 99.9% of the Instructabes are so poorly written that they are not a learning experience, they only confuse and confound. For example, this was a comment in the article you mentioned:

**IMPORTANT NOTE ABOUT LED VOLTAGE: The LED lights I purchased are extremely bright and require 12V. The Arduino only outputs 5V by default, like when powered by USB. That being said, you can get 12V output from the Arduino by using a 12V adapter. You'll get 12V from the VIN port on the Arduino and will also get 5V through the 5V ports (which is very helpful). If you can, try to buy 5V LED strips if possible because 12V is extremely bright.

Such nonsense.

Hi,
Welcome back to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Thanks.. Tom.. :slight_smile:

Hello,

Thanks Tom for the notice. I'll make sure to use it next time round :slight_smile:

As for the link to the circuit diagramme, here's the link to the page Word-Clock. The diagramme can be found close to the very bottom.

@avr_fred: I agree! And unfortunately it doesn't stop there. Last time round you guys helped me correct the sketch I had downloaded in order to get the hour and minute buttons to work correctly. Oh well ...

Thanks and best wishes,

Sven

Hi,
the link to your circuit is forbidden.
If you read the reference I posted I will tell you how to attach and display images.

Tom... :slight_smile:

I included the TimeLib library but now I get the error message that RTC is not declared. However, this only concerns RTC.read(tm) and not RTC.write(tm). Any ideas?

Many thanks!
Sven