LED and aquarium controller with TFT LCD touch screen

it seems ok just compiled now need to see if works at a 3.2'' tft

the 3,2'' screen when i upload the code flashes and instantly reflashes

- YouTube

any thoughts?
i have change in the code my screen module UTFT myGLCD(SSD1289,38,39,40,41); //
and tried both
UTouch myTouch(46,45,44,43,42);
UTouch myTouch(1,2,3,4,5);
also example sketches run perfect, i calibrated the screen. what else?

and a second video

the code

Stilo_3_0.ino (90.6 KB)

and the original code

Stilo_3_0.ino (90.6 KB)

the arduino i use http://www.ebay.com/itm/SainSmart-Mega2560-R3-3-2-034-TFT-Touch-LCD-SD-Card-TFT-Shield-for-Arduino-US-/301093943424?ssPageName=STRK:MESE:IT
and the build guide

all the files code, libraries and build guide

Stilo_3_0 (1).zip (1020 KB)

Hi Mathiu,
I have tried to compile the sketch and getting some errors have you tried to figure it out ? does it work for you?
here are the error that I get

Arduino: 1.8.0 (Windows 7), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"
C:\Users\Doss\Documents\Arduino\libraries\UTFT\DefaultFonts.c:14:14: error: variable 'SmallFont' must be const in order to be put into read-only section by means of 'attribute((progmem))'
fontdatatype SmallFont[1144] PROGMEM={
^
C:\Users\Doss\Documents\Arduino\libraries\UTFT\DefaultFonts.c:118:14: error: variable 'BigFont' must be const in order to be put into read-only section by means of 'attribute((progmem))'
fontdatatype BigFont[3044] PROGMEM={
^
C:\Users\Doss\Documents\Arduino\libraries\UTFT\DefaultFonts.c:227:14: error: variable 'SevenSegNumFont' must be const in order to be put into read-only section by means of 'attribute((progmem))'
fontdatatype SevenSegNumFont[2004] PROGMEM={
^
exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Now I don't wish to seem silly but I'm very new and don't understand very much, can you help?
I have a funny feeling that this is library related, what do you think?

Ross. :confused:

Hi Ross, also newbie here with arduinos. so far didn't saw these errors, the video i upload on youtube it seems to be a problem with the code maybe by my fault. still trying to figure out

ok so i download the URTouch library and change the UTouch.h with the URTouch.h in code of stilo , then calibrate the screen, when i upload examples sketches i must upload them 2 or 3 times to work with out problem. and last the screen is like this - YouTube

the code so far

Stilo_3_0.ino (89.2 KB)

So as a friend suggest me to download any previous ide I download the 1.5.7 and it seems to work - YouTube the only problem is when I disconnect the arduino from the pc and try a 12v power supply it seems like it looses the screen calibration also the same problem if connect again with the pc. So I calibrate again the screen then upload the code again. While it is plugged with the pc works perfect. Any suggestions?

And a second video - YouTube

ok so the problem was i using the URTouch library and not the Utouch when i change that worked perfect!

ROSS try to download the 1.5.7 IDE

and a video

and the code

Stilo_3_0.ino (89.2 KB)

Any suggestions to put the screen into sleep mode? After a short research didn't find something useful.

Mathiu

Thankyou for continuing with this I've downloaded the 1.5.7 IDE but been too busy to proceed any further I will get back to it in a few days.

Ross

Which transistor should i use to the ato pump? I have a 12v pump.

Some update. I add the rtc, water temperature, and make the ato work perfectly. Stilo 3.0 - YouTube

Hello. I have a problem installing stilo 3.0.
I get these errors:

In file included from Stilo_3_0.ino:46:
/writeAnything.h: In function 'int EEPROM_writeAnything(int, const T&)':
writeAnything.h:6: error: 'EEPROM' was not declared in this scope
/writeAnything.h: In function 'int EEPROM_readAnything(int, T&)':
writeAnything.h:15: error: 'EEPROM' was not declared in this scope
Stilo_3_0.ino: In function 'void SaveToEEPROM(int)':
Stilo_3_0:752: error: 'EEPROM' was not declared in this scope
Stilo_3_0.ino: In function 'void ReadFromEEPROM()':
Stilo_3_0:824: error: 'EEPROM' was not declared in this scope
Stilo_3_0.ino: In function 'void ClearEEPROM()':
Stilo_3_0:907: error: 'EEPROM' was not declared in this scope

I have a 3-2-TFT-LCD-Display-Touch-Screen-Shield-V2-2-Mega2560-Board-Kit.

link: http://www.ebay.com/itm/3-2-TFT-LCD-Display-Touch-Screen-Shield-V2-2-Mega2560-Board-Kit-for-Arduino/331607425639?ssPageName=STRK%3AMEBIDX%3AIT&var=540757189514&_trksid=p2057872.m2749.l2649

Hi guys, when I try to compile I have this:

Arduino:1.8.4 (Windows 10), Scheda:"Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino:2:0:

C:\Users\pietro\Desktop\Arduino\libraries\writeAnything/writeAnything.h: In function 'int EEPROM_writeAnything(int, const T&)':

writeAnything.h:6: error: 'EEPROM' was not declared in this scope

    EEPROM.write(ee++, *p++);

    ^

C:\Users\pietro\Desktop\Arduino\libraries\writeAnything/writeAnything.h: In function 'int EEPROM_readAnything(int, T&)':

writeAnything.h:15: error: 'EEPROM' was not declared in this scope

    *p++ = EEPROM.read(ee++);

           ^

In file included from C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino:49:0:

sketch\writeAnything.h: At global scope:

writeAnything.h:1: error: redefinition of 'template<class T> int EEPROM_writeAnything(int, const T&)'

 template <class T> int EEPROM_writeAnything(int ee, const T& value)

                        ^

In file included from C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino:2:0:

C:\Users\pietro\Desktop\Arduino\libraries\writeAnything/writeAnything.h:1:24: note: 'template<class T> int EEPROM_writeAnything(int, const T&)' previously declared here

 template <class T> int EEPROM_writeAnything(int ee, const T& value)

                        ^

In file included from C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino:49:0:

writeAnything.h:10: error: redefinition of 'template<class T> int EEPROM_readAnything(int, T&)'

 template <class T> int EEPROM_readAnything(int ee, T& value)

                        ^

In file included from C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino:2:0:

C:\Users\pietro\Desktop\Arduino\libraries\writeAnything/writeAnything.h:10:24: note: 'template<class T> int EEPROM_readAnything(int, T&)' previously declared here

 template <class T> int EEPROM_readAnything(int ee, T& value)

                        ^

Stilo_3_0:55: error: 'UTouch' does not name a type

 UTouch      myTouch(46,45,44,43,42);

 ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void hlightButton(char*, int, int, int, int)':

Stilo_3_0:451: error: 'myTouch' was not declared in this scope

   while (myTouch.dataAvailable()) {

          ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void hlightUpButton(int, int)':

Stilo_3_0:485: error: 'myTouch' was not declared in this scope

   while (myTouch.dataAvailable()) {

          ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void hlightDownButton(int, int)':

Stilo_3_0:498: error: 'myTouch' was not declared in this scope

   while (myTouch.dataAvailable()) {

          ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void printDate(int, int)':

Stilo_3_0:614: error: 'RTC' was not declared in this scope

   strcat(chDate, Day[RTC.dow]);

                      ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void SaveRTC()':

Stilo_3_0:916: error: 'RTC' was not declared in this scope

    RTC.stopClock();     

    ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void LED_levels_output()':

Stilo_3_0:935: error: 'RTC' was not declared in this scope

   min_cnt= (RTC.hour*60)+RTC.minute;

             ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void moon_init()':

Stilo_3_0:990: error: 'RTC' was not declared in this scope

   moonphase(RTC.year, RTC.month, RTC.day);

             ^

Stilo_3_0:990: error: 'moonphase' was not declared in this scope

   moonphase(RTC.year, RTC.month, RTC.day);

                                         ^

Stilo_3_0:993: error: 'riseset' was not declared in this scope

     riseset(latitude, longtitude);

                                 ^

Stilo_3_0:997: error: 'Moon' was not declared in this scope

     if (Moon.isRise) {

         ^

Stilo_3_0:1004: error: 'Moon' was not declared in this scope

     if (Moon.isSet) {

         ^

Stilo_3_0:1023: error: 'Moon' was not declared in this scope

       if ( (!Moon.isSet) || ((rise_time > set_time)&&(tnow>=rise_time)) ) {      //calculate for next day

              ^

Stilo_3_0:1028: error: 'Moon' was not declared in this scope

       itoa(Moon.setH, tmpChar, 10);

            ^

Stilo_3_0:1040: error: 'Moon' was not declared in this scope

       if ( (!Moon.isRise) || ((set_time > rise_time)&&(tnow>=set_time)) ) {      //calculate for next day

              ^

Stilo_3_0:1045: error: 'Moon' was not declared in this scope

       itoa(Moon.riseH, tmpChar, 10);

            ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void moonlight_output()':

Stilo_3_0:1079: error: 'RTC' was not declared in this scope

   long tnow = RTC.time2000;

               ^

Stilo_3_0:1082: error: 'Moon' was not declared in this scope

     tout = map(Moon.light, 0, 100, moonSett.newMoonLight, moonSett.fullMoonLight);

                ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void mainScreen(boolean)':

Stilo_3_0:1147: error: 'RTC' was not declared in this scope

   if ((RTC.hour!=prevRTC.tHour) || (RTC.minute!=prevRTC.tMinute) || refreshAll) {    //time

        ^

Stilo_3_0:1154: error: 'RTC' was not declared in this scope

   if ((RTC.day!=prevRTC.tDay) || (RTC.month!=prevRTC.tMonth) || (RTC.year!=prevRTC.tYear) || refreshAll) {     //date

        ^

Stilo_3_0:1221: error: 'tmpMoon' was not declared in this scope

   if ((tmpMoon.light!=Moon.light) || refreshAll) {       //moonlight part

        ^

Stilo_3_0:1221: error: 'Moon' was not declared in this scope

   if ((tmpMoon.light!=Moon.light) || refreshAll) {       //moonlight part

                       ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void clockScreen(boolean)':

Stilo_3_0:1274: error: 'RTC' was not declared in this scope

       tmpRTC.tHour = RTC.hour;

                      ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void testScreen(boolean)':

Stilo_3_0:1380: error: 'myTouch' was not declared in this scope

       if (myTouch.dataAvailable())  {

           ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void processMyTouch()':

Stilo_3_0:1785: error: 'myTouch' was not declared in this scope

   myTouch.read();

   ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void setup()':

Stilo_3_0:2495: error: 'myTouch' was not declared in this scope

   myTouch.InitTouch(LANDSCAPE);

   ^

Stilo_3_0:2513: error: 'RTC' was not declared in this scope

   RTC.getTime();

   ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void loop()':

Stilo_3_0:2537: error: 'myTouch' was not declared in this scope

   if (myTouch.dataAvailable())  {

       ^

Stilo_3_0:2561: error: 'RTC' was not declared in this scope

       RTC.getTime();

       ^

Stilo_3_0:2588: error: 'RTC' was not declared in this scope

         if (((moonSett.moonrise == RTC.hour) || (moonSett.moonset == RTC.hour)) && (RTC.minute == 0)) {

                                    ^

Stilo_3_0:2597: error: 'Moon' was not declared in this scope

       else if (((Moon.riseH == RTC.hour) && (Moon.riseM == RTC.minute)) || ((Moon.setH == RTC.hour) && (Moon.setM == RTC.minute))) {

                  ^

Stilo_3_0:2597: error: 'RTC' was not declared in this scope

       else if (((Moon.riseH == RTC.hour) && (Moon.riseM == RTC.minute)) || ((Moon.setH == RTC.hour) && (Moon.setM == RTC.minute))) {

                                ^

exit status 1
'EEPROM' was not declared in this scope

Questo report potrebbe essere più ricco di informazioni abilitando l'opzione
"Mostra un output dettagliato durante la compilazione"
in "File -> Impostazioni"

Someone to help me please??