Hi everyone, I have been having issues getting DCC++ going. I downloaded the code from GitHub and did not change anything as far as I know. When I try to verify/program the Arduino I get the following error messages: C:\Users\Jacob\Desktop\Documents\Arduino\libraries\DCCpp_Uno\DCCpp_Uno.ino:427:152: warning: backslash and newline separated by space R.currentBit=0; /* reset current bit pointer and determine which Register and Packet to process next--- */ \ ^ C:\Users\Jacob\Desktop\Documents\Arduino\libraries\DCCpp_Uno\DCCpp_Uno.ino:433:100: warning: backslash and newline separated by space R.tempPacket=R.currentReg->activePacket; /* flip active and update Packets */ \ ^ C:\Users\Jacob\Desktop\Documents\Arduino\libraries\DCCpp_Uno\DCCpp_Uno.ino:449:103: warning: backslash and newline separated by space } /* END-ELSE */ \ ^ C:\Users\Jacob\Desktop\Documents\Arduino\libraries\DCCpp_Uno\DCCpp_Uno.ino:450:88: warning: backslash and newline separated by space \ ^ C:\Users\Jacob\Desktop\Documents\Arduino\libraries\DCCpp_Uno\DCCpp_Uno.ino:196:59: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] CurrentMonitor mainMonitor(CURRENT_MONITOR_PIN_MAIN,"<p2>"); // create monitor for current on Main Track ^ C:\Users\Jacob\Desktop\Documents\Arduino\libraries\DCCpp_Uno\DCCpp_Uno.ino:197:59: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] CurrentMonitor progMonitor(CURRENT_MONITOR_PIN_PROG,"<p3>"); // create monitor for current on Program Track ^ Sketch uses 18516 bytes (57%) of program storage space. Maximum is 32256 bytes. Global variables use 898 bytes (43%) of dynamic memory, leaving 1150 bytes for local variables. Maximum is 2048 bytes. No videos on Youtube seem to have a solution to this issue. I'm sure its a simple fix, thanks.
I got that also after a few times. If i remember right if you do not get a fatal error it will run ok.
Looks like a problem with the ISR macro function. Each line within the macro must be finished with a backslash „\“. Check for spaces following this character and delete them.
This got rid of most the errors, I still have two errors left. C:\Users\Jacob\AppData\Local\Temp\arduino_modified_sketch_964565\DCCpp_Uno.ino:196:59: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] CurrentMonitor mainMonitor(CURRENT_MONITOR_PIN_MAIN,"<p2>"); // create monitor for current on Main Track ^ C:\Users\Jacob\AppData\Local\Temp\arduino_modified_sketch_964565\DCCpp_Uno.ino:197:59: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] CurrentMonitor progMonitor(CURRENT_MONITOR_PIN_PROG,"<p3>"); // create monitor for current on Program Track ^ Thank you!
hi, this is only a compiler warning, and with the version 1.8.3 of the Arduino IDE it runs fine on an UNO, so simply ignoring the warning should be no problem. To get rid of the warning you can change in "CurrentMonitor.h" Line 28 >> char *msg; << to >> const char *msg; << Line 29 >> CurrentMonitor(int, char *); << to >> CurrentMonitor(int, const char *); << and in the file "CurrentMonitor.cpp" Line 16 >> CurrentMonitor::CurrentMonitor(int pin, char *msg){ << to >> CurrentMonitor::CurrentMonitor(int pin, const char *msg){ << With the above version I have no more compiler warnings! Peter
Thank you Peter for this update. I too had the same warnings and was looking to clear them out. Your advice is right on the mark.