I know, I know, I haven't done a "Welcome Post" yet...I'm getting to it...shortly...
So here's my dilemma...I'm new at C++ (only been at it for about a month). I am self-teaching the best way I know possible..Hands-on, and lots of reading and screwing things up (I learn best from my own mistakes). I don't (and won't) post things up like "I need help fast! I need someone to code for me..it's urgent!!"...God knows, I cringe and my sphincter puckers when I see people do that.
Well, here we go...I've been Googling and searching for a trick to this, but cannot find anything that makes sense. I'm trying to replicate a project I found online (https://howtomechatronics.com/projects/arduino-touch-screen-music-player-alarm-clock-project/).
I'm using most all the same components that he has listed, but I have a bigger TFT LCD that I want to use (Kuman for Arduino UNO R3 3.5 inch TFT Touch Screen with SD Card Socket w/ Tutorials in CD for Arduino Mega2560 Board SC3A-1,LCD/LED).
I've modified his original sketch as best as I could to fit this LCD (some of you may want to say "butchered", not modified..lol). I keep getting "redeclaration of 'uint16_t print " error messages for every 3rd or 4th instance of printing the color or text to the screen.
// Draws a colon between the hours and the minutes
uint16_t fillcolor (0, 255, 0);
uint16_t fillCircle (112, 65, 4);
uint16_t fillcolor (0, 255, 0);
uint16_t fillCircle (112, 85, 4);
uint16_t setFont(SevenSegNumFont);
uint16_t fillcolor(0, 255, 0);
uint16_t printNumI(aHours, 32, 50, 2, '0');
uint16_t printNumI(aMinutes, 128, 50, 2, '0');
uint16_t fillcolor (255, 255, 255);
uint16_t drawRoundRect (42, 115, 82, 145);
uint16_t drawRoundRect (138, 115, 178, 145);
uint16_t setFont(BigFont);
uint16_t print("H", 54, 122);
uint16_t print("M", 150, 122);
And this is the error I get:
alarm-mp3-bedside-clock:265:24: error: redeclaration of 'uint16_t fillcolor'
uint16_t fillcolor (0, 255, 0);
^
C:\Users\JD\Arduino Sketches\test\alarm-mp3-bedside-clock\alarm-mp3-bedside-clock.ino:260:14: note: 'uint16_t fillcolor' previously declared here
uint16_t fillcolor(255, 255, 255);
^
alarm-mp3-bedside-clock:267:24: error: redeclaration of 'uint16_t fillcolor'
uint16_t fillcolor (0, 255, 0);
^
C:\Users\JD\Arduino Sketches\test\alarm-mp3-bedside-clock\alarm-mp3-bedside-clock.ino:260:14: note: 'uint16_t fillcolor' previously declared here
uint16_t fillcolor(255, 255, 255);
^
alarm-mp3-bedside-clock:268:25: error: redeclaration of 'uint16_t fillCircle'
uint16_t fillCircle (112, 85, 4);
^
C:\Users\JD\Arduino Sketches\test\alarm-mp3-bedside-clock\alarm-mp3-bedside-clock.ino:266:14: note: 'uint16_t fillCircle' previously declared here
uint16_t fillCircle (112, 65, 4);
^
alarm-mp3-bedside-clock:270:37: error: redeclaration of 'uint16_t setFont'
uint16_t setFont(SevenSegNumFont);
^
C:\Users\JD\Arduino Sketches\test\alarm-mp3-bedside-clock\alarm-mp3-bedside-clock.ino:259:14: note: 'uint16_t setFont' previously declared here
uint16_t setFont(BigFont);
As much as I hate to ask for help...the wife is getting pissed that I'm investing so much time, with no "visible results" that she can see..Hahahaaa...I can see the progress, but she wants the damn bedside clock/radio...
I'll attach the original code (Dejan_Nedelkovski_clock_radio), and mine (alarm-mp3-bedside-clock) as well, so you can see how I "modified" it...
If you can simply tell me what I did wrong, and what the fix is, I'd be more than happy to go through and fix it...I don't expect anyone to re-write the entire code for me...just gimme a clue...lol...I'm sure it's probably just a missing library...or something else I butchered...
Thanks for any assistance...You guys rock...
Dejan_Nedelkovski_clock_radio.ino (17.8 KB)
alarm-mp3-bedside-clock.ino (18.6 KB)